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'
Comments
Leave a comment