(Concepts needed: conditional structure, sentinel controlled structure, and func
ID: 3628142 • Letter: #
Question
(Concepts needed: conditional structure, sentinel controlled structure, and function)Write a C++ program to calculate the average score for uncertain number of students.
Define variables – score, student_no and sum
Use sentinel controlled structure to do the following:
a. Ask user to input an integer as student score. Please do the error checking for the score. The
range of score is between 0 and 100. If the score is not in the range, please display an error
message and ask user to input a new score.
b. Add the valid score to sum
c. Repeat step a and b until user input a user defined sentinel value to stop the loop
Define a function to calculate the average - dividing sum by student_no. Please note that the average is float not integer.
Display the number of students, total points, and average (2 decimal places).