A.
FOR LOOP (5 Questions)
Q1. Print Natural Numbers
Write a C++ program using a for loop to print all natural numbers from 1 to 10.
Q2. Multiplication Table
Write a C++ program using a for loop to display the multiplication table of a number entered by
the user.
Q3. Sum of First N Numbers
Write a C++ program using a for loop to calculate the sum of first N natural numbers.
Q4. Factorial of a Number
Write a C++ program using a for loop to find the factorial of a number entered by the user.
Q5. Count Digits
Write a C++ program using a for loop to count the number of digits in an integer entered by the
user.
B. WHILE LOOP (5 Questions)
Q6. Print Even Numbers
Write a C++ program using a while loop to print all even numbers between 1 and 20.
Q7. Reverse a Number
Write a C++ program using a while loop to reverse a given number.
Q8. Sum of Digits
Write a C++ program using a while loop to calculate the sum of digits of a number entered by
the user.
Q9. Password Validation
Write a C++ program using a while loop that repeatedly asks the user to enter a password until
the correct password is entered.
Q10. Menu-Driven Program
Write a menu-driven C++ program using a while loop that keeps running until the user selects
Exit.