Please write aprogram that computes the average of 3 exam scores of 3 students. It first asksthe user three exam scores for each student and then compute the average ofthem. The program shouldhave the...

1 answer below »


Please write a
program that computes the average of 3 exam scores of 3 students. It first asks
the user three exam scores for each student and then compute the average of
them.














The program should
have the following functions.










  • int getTestScore():

    This function is called by main function. It asks the user to enter the

    score of the exam. Once it gets a user input data, the function returns it

    to the main function. Input Validation: Please check if the entered score

    is between 0 and 100 inclusive (considered valid). If not, repeat asking

    to enter a valid score.





  • double

    calAverage(int, int, int, int, int):

    This function is called by main function. It calculates the average

    of 3 exam scores passed from main function in int data type. Once the function

    calculates the average, it returns it to main function in double data

    type.





  • void display(string,

    double): This function is called by main function and displays the

    student’s name and average exam score. The arguments are students’ name

    and the average exam score.





  • main(): Main

    function calls getTestScore() 3 times

    for each student to get the student’s 3 exam scores. And then, it

    calls calAverage() and display() to compute and displace the average of

    the 3 exam scores for that student.

    Please complete this process for 3 students using loop structure.




Answered Same DayOct 04, 2022

Answer To: Please write aprogram that computes the average of 3 exam scores of 3 students. It first asksthe...

Nidhi answered on Oct 04 2022
60 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here