flow of control
[SET – 2]

1

Write a program to print number from 1 to 10. solution

2

Write a program to calculate the sum of first 10 natural number. solution

3

Write a program to find the factorial value of any number entered through the keyboard. solution

4

Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another. solution

5

Write a program to reveres any given integer number. solution

6

Write a program to sum of digits of given integer number. solution

7

Write a program to check given number is prime or not. solution

8

Write a program to calculate HCF of Two given number. solution

9

Write a program to enter the numbers till the user wants and at the end it should display the count of positive, negative and zeros entered. solution

10

Write a program to enter the numbers till the user wants and at the end it should display the maximum and minimum number entered. solution

11

Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
For example, 153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 ) + ( 3 * 3 * 3 ) solution

12

Write a program to print Fibonacci series of n terms where n is input by user : 0 1 1 2 3 5 8 13 24 ..... solution

13

Write a program to calculate the sum of following series where n is input by user.
1 + 1/2 + 1/3 + 1/4 + 1/5 +…………1/n solution

14

Compute the natural logarithm of 2, by adding up to n terms in the series
1 - 1/2 + 1/3 - 1/4 + 1/5 -... 1/n
where n is a positive integer and input by user. solution