Part I: Write a complete program (using a loop) that will input 20 grades.
Find the average of the Passing grades.answer

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. double cost;
2. Declare a variable to hold the value of Month. int month;
3. The statement below could cause an error. Explain. If Count is 0, it will cause an error.
    Average = Total/Count
4. What is a nested loop. Give an example.If Count is 0, it will cause an error.
5. What is an endless loop. Give an example.If Count is 0, it will cause an error.
5. A loop reads in NUM and finds the total. There are 3 statements that refer to Total:
    Declaration: ________________________________ double Total = 0.0; //same type as num
    Inside the loop: _________________________________ Total = Total + Num;
    After the loop: __________________________________ Print Total, use it to calculate average etc.

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.