Looping Lab Exercises

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

LOOPING LAB EXERCISES

Justine Nicole V. Siñgo | BSIT 1 – 9


1. Write a program using while loop statement that will display a series of numbers from 1 to 100 and 100 to 1.
2. Write a program using while loop statement that will display odd and even number from 100 to 200.
3. Write a program that will put a starting numbers and an ending number and will print all even numbers within the two numbers.
4. Write a program that will ask the user to input a stating numbers and ending numbers. Based from the given range, display all odds, even
and prime numbers.
5. Write a program to compute the sume of 1 to 100 using for, while and do-while statements. Display the output on the screen.
6. Write a program to compute and accept 10 numbers from the user and then compute the average value of the 10 numbers given by the
user.
7. Write a program that will reverse the input number of the user.
8. Write a program that will display all the prime numbers from 1 to 200.
9. Write a program that will display the following sequence of number using for, while and do-while statements.
10. Write a program that will display the following sequence of numbers using for loop statement.

You might also like