Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that asks the user to enter a students grades on three exams and then averages them. Your program should have the

Write a C++ program that asks the user to enter a students grades on three exams and then averages them. Your program should have the following functions:

getScore: Asks the user to enter one test score. If the score is invalid (less than 0 or greater than 100), ask the user to re-enter the score. Once a valid score is entered, return it. calculateAverage: Takes three test scores as arguments. It calculates the average score and returns it. Your main function should call getScore three times, assigning the return value of each call to one of three different variables. It should then call calculateAverage, pass those three variables, and print the average returned by calculateAverage.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

How could assessment be used in an employee development program?

Answered: 1 week ago