Posts

Showing posts from December, 2020

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 no...

If & Switch Block

  Assignment: 1. Write a   program that accepts two integer values from the user and return the larger values. 2. Write a   program to compare two numbers use operators like <, >, <=,>=, ==, != Input Data: Input first integer: 25 Input second integer: 39 Expected Output 25 != 39                                                                           25 < 39                                                                            25 <= 39 3. Check number is even or odd 4. Program to find Largest of three numbers 5. Write a   program to calc...