While block & For loop

 Assignment :


1. write a program to print 0 to 10

2. write a program to print 10 to 20

3. write a program to print 10 to 1

4. Calculate the Sum of Natural Numbers Upto 100

5. print Even/ odd numbers upto 30

6.Print even numbers and odd numbers separately between 0 to 100

7. Power of a numbers 

8.Check Whether a Number is Prime or Not

9.write a program to print 0 to 10 except 7

10.Prime Numbers Between Two Intervals Ex :- 1 to 50, 100 to 200

11.program to compute the sum of the first 100 prime numbers

12.Check given number is palindrome or not 

13.Program to display first 100 prime numbers

Print the numbers ending with 2, 4, 6, 8 between 1 to 100 range

18. Print the numbers having 3 or 6 or 9 in the middle of any three letter number between 100 to 200 range

Write a   program and compute the sum of the digits of an integer.  

Input Data:

Input an integer: 25

Expected Output

The sum of the digits is: 7

11. Given number is Armstrong number or not 

12.Display Armstrong Number Between Two Intervals

13.Display Factors of a Number

Ref : https://www.programiz.com/c-programming/examples/factors-number

14. Prime numbers 

15.  display alternate prime numbers

16. Program for Fibonacci series 1 to 100

17. write a program to print n-th matrices

18. 10th->10

   20

   30

   .....

   100

19.Find Factorial using For and While loop

20.Write a   program that accepts an integer (n) and computes the value of n+nn+nnn.  

Input number: 5  

Sample Output:                                                      

5 + 55  + 555

21.Check Whether a Number can be Expressed as Sum of Two Prime Numbers   

22.Write a   program to convert seconds to hour, minute and seconds.  

Input seconds: 86399 

Sample Output:                                                  

23:59:59

23.Write a   program that accepts two integer values between 25 to 75 and return true if there is a common digit in both numbers.  

Input the first number : 35                                            

Input the second number: 45   

Sample Output:

Result: true

24.Write a   program to add two numbers without using any arithmetic operators.  

Given x = 10 and y = 12; result = 22

25.Write a   program to compute the square root of an given integer.  

Input a positive integer: 25

Square root of 25 is: 5

26.Write a program to Display Invert Triangle


Comments

Popular posts from this blog

If & Switch Block

Collection Framework