0% found this document useful (0 votes)
10 views1 page

Loop Question

The document outlines a series of programming homework assignments dated 24/11/22. Tasks include writing programs for printing even numbers, calculating factorials, exponentiation, summing integers, checking for prime numbers, calculating HCF, using loops for repeated operations, and counting positive, negative, and zero integers. Additionally, it requires finding the largest and smallest numbers from user input.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Loop Question

The document outlines a series of programming homework assignments dated 24/11/22. Tasks include writing programs for printing even numbers, calculating factorials, exponentiation, summing integers, checking for prime numbers, calculating HCF, using loops for repeated operations, and counting positive, negative, and zero integers. Additionally, it requires finding the largest and smallest numbers from user input.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

HOMEWORK

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.

6. Write a program to calculate HCF of Two given 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.

You might also like