Assignment
Assignment
Q1. Print Even Numbers: Write a program to print all even numbers between 1
and 100 ?
Q2. Print Odd Numbers: Write a program to print all odd numbers between 1
and 100.
Q3. Sum of First N Natural Numbers: Write a program to calculate the sum of the
first N natural numbers.
Q4. Print Multiplication Table: Write a program to print the multiplication table
of a given number.
Q5. Factorial of a Number: Write a program to calculate the factorial of a
number entered by the user.
Q6. Reverse a Number: Write a program to reverse a given number using a for
loop.
Q7. Fibonacci Series: Write a program to print the first N terms of the Fibonacci
series.
Q8. Find Power of a Number: Write a program to calculate x^y (x raised to the
power y) using a for loop.
Q9. Count Digits in a Number: Write a program to count the number of digits in
a given integer.