Loop Question
Loop Question
24/11/22
1. Write a program to print only the even number between 1 to 10, without using
the selection method.
2.Write a program to find the factorial value of any number entered through the
keyboard.
3. Two numbers are entered through the keyboard. Write a program to find the
value of one number raised to the power of another. (Do not use Java built-in
method)
4.Write a program that reads a set of integers, and then prints the sum of the even
and odd integers.
5. Write a program that prompts the user to input a positive integer. It should
then output a message indicating whether the number is a prime number.
7. Write a do-while loop that asks the user to enter two numbers. The numbers
should be added and the sum displayed. The loop should ask the user whether he
or she wishes to perform the operation again. If so, the loop should repeat;
otherwise it should terminate.
8. 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.
9. Write a program to enter the numbers till the user wants and at the end the
program should display the largest and smallest numbers entered.