Answer to Question #255127 in Algorithms for Israel

Question #255127
Algorithm for a program to allow multiple sets of scores to be averaged. Valid entries must be numeric and in the range of 0 to 100. Calculate the average of the scores entered. Allow any number of scores to be entered per data set but assume that there will be at least one score entered. Use a sentinel-controlled loop variable to terminate the loop. After values are entered and average is calculated, test the average to determine whether an A, B, C, D or F should be recorded. The scoring rubric is as follows: A: 90 to 100; B80 to 89; C 70 to 79; D 60 to 69 and F <60.
1
Expert's answer
2021-10-23T23:31:47-0400
1. Set sum equals 0
2. Set num equals 0
3. Ask a user to enter values, and negative one to finish
4. Read a value from a user
5. If entred value is negative go to step 9
6. Add value to sum
7. Add one to num
8. Go to step 4
9. Set avg equal sum / num
10. If avg is greater or equal 90, set mark equal 'A'
11. Else if avg is greater or equal 80, set mark equal 'B'
12. Else if avg is greater or equal 70, set mark equal 'C'
13. Else if avg is greater or equal 60, set mark equal 'D'
14. Else set mark equal 'F'

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS