Electrical
and Computer Engineering
Problem-Solving Case Study-
Warning Notices
•Problem: In order to warn freshmen who are in danger of failing a class, your program should calculate the
average of three tests. Then, the program
prints out the student id, average, and
either pass, fail, or marginal.
•Input: Student ID number (long) followed by three test grades.
•Output: A prompt for input, echo print input, id,
average, message with possible error message
for invalid data (<0).
•Discussion: Passing is >= 70.0, marginal is < 70.0
and >= 60.0, failing is < 60.0.