brainfrz

Untitled

Oct 1st, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Write an algorithm for the following problem:
  2.  
  3. 1. Prompts the user for the number of grades they wish to enter.
  4.  
  5. 2. Using a Counter Controlled While Loop, get that many grades from the user.
  6.  
  7. Compute a running total of these grades as they are entered.
  8. Count each grade as it is entered.
  9. After the While Loop is done executing, compute the average of all the grades entered.
  10. Before computing the average, use an IF statement to error check to prevent division by zero.
  11.  
  12. 3. Print out the average of the grades.
  13.  
  14. Include Input, Output, Additional, Formulas (if any), Initial Algorithm, and Refined Algorithm.
Advertisement
Add Comment
Please, Sign In to add comment