🔥 Basic Problems (For Beginners)
1️⃣ Print numbers from 1 to N (User input).
2️⃣ Print numbers from N to 1 (User input).
3️⃣ Print all even numbers from 1 to N.
4️⃣ Print all odd numbers from 1 to N.
5️⃣ Find the sum of first N natural numbers.
6️⃣ Find the sum of all even numbers from 1 to N.
7️⃣ Find the sum of all odd numbers from 1 to N.
8️⃣ Find the factorial of a number N.
9️⃣ Count the number of digits in an integer (User input).
🔟 Find the reverse of a number (e.g., 1234 → 4321).
⚡ Intermediate Problems (Logical Thinking)
1️⃣1️⃣ Check if a number is prime or not.
1️⃣2️⃣ Print the Fibonacci series up to N terms.
1️⃣3️⃣ Count the number of vowels in a given string.
1️⃣4️⃣ Check if a number is palindrome (121 → 121).
1️⃣5️⃣ Print multiplication table of a number N.
1️⃣6️⃣ Find the greatest common divisor (GCD) of two numbers.
1️⃣7️⃣ Print all numbers from 1 to N, but skip multiples of 3.
1️⃣8️⃣ Find the sum of digits of a number (123 → 1+2+3 = 6).
1️⃣9️⃣ Find the largest digit in a number (964 → 9).
2️⃣0️⃣ Find the smallest digit in a number (278 → 2).
📝 Problems:
1️⃣ If-Else Conditions
1. Write a program to check whether a number is even or odd.
2. Write a program to check whether a given year is a leap year.
3. Write a program to find the largest among three numbers.
4. Write a program to check whether a number is positive, negative, or
zero.
5. Write a program to determine whether a given character is a vowel or
a consonant.
2️⃣ Loops (For & While)
6. Write a program to print the first 10 natural numbers using a loop.
7. Write a program to calculate the sum of first N natural numbers (N
is given by the user).
8. Write a program to print the multiplication table of a given number.
9. Write a program to count the number of digits in an integer.
10. Write a program to reverse a given number.
3️⃣ Nested Loops
11. Write a program to print the following pattern:
markdown
CopyEdit
**
***
****
*****
12. Write a program to print the Fibonacci series up to N terms.
13. Write a program to check whether a given number is a prime
number or not.
14. Write a program to print all prime numbers in a given range.
15. Write a program to find the factorial of a given number.
4️⃣ Break, Continue, and Pass
16. Write a program that stops taking input from the user when they
enter 0.
17. Write a program that skips even numbers and prints only odd
numbers from 1 to 20.
18. Write a program that uses the pass statement inside a loop.
19. Write a program to find the sum of digits of a number.
20. Write a program to find the GCD (Greatest Common Divisor)
of two numbers using a loop.