Zebra0.com

javaDisplay "pass" or "fail" for each grade

Display "pass" or "fail" for each grade

This loops to show "pass" or "fail" for each grade.

Notice that the first value is read before the loop and each subsequent value is read as the last thing in the loop. This avoid the problem of the negative value showing "Fail".