Question: Write a complete C++ program to input 3 integer test scores, and output the real average. For example, if the test scores are 90, 79,

Write a complete C++ program to input 3 integer test scores, and output the real average. For example, if the test scores are 90, 79, and 88, the output from your program should be

Average: 85.6667 

followed by a newline. However, it is possible that one or more of the scores is invalid, in which case the program should output "invalid data!" followed by a newline. Note that it is possible for multiple scores to be invalid --- your program should output "invalid data!" exactly once. A score is invalid if it is less than 0 or greater than 100. [ When working with data, it is common practice to validate data before performing computations. ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!