Part I: Write a complete program (using a loop) that will input 20
grades.
Find the average of the Passing grades.
Part II.
1. Write a WHILE loop to print the numbers 1, 2, 4, 8, 16, 32, 64, 128, 256.
2. Write a FOR loop to print the numbers 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0.
3. Write a FOR loop to print the numbers 50, 45, 40, 35, 30, 25, 20.
Part III.
1. Declare a variable to hold the cost of an item.
2. Declare a variable to hold the value of Month.
3. The statement below could cause an error. Explain.
Average = Total/Count
4. What is a nested loop. Give an example.
5. What is an endless loop. Give an example.
5. A loop reads in NUM and finds the total. There are 3 statements that refer
to Total:
Declaration: ________________________________
Inside the loop: _________________________________
After the loop: __________________________________
4. Using the sample programs as a model, write a program that will loop to input numbers. Print the total, count, average, smallest and largest.