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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started