Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using C++ void functions and parameters Write a C++ program that accepts up to 20 integers test scores in the range of 0 to 100

using C++ void functions and parameters

Write a C++ program that accepts up to 20 integers test scores in the range of 0 to 100 from the user, and stores them. 
The program should give the user a menu with the following options:
 
  • Print a list of all scores entered using a function that receives the scores.
  • report how many scores less than 70 were entered using a function.
  • report how many scores greater than or equal to 90 were entered using a function of your choice.
  • determine and report the average passing score (average of scores 70 & greater) in a function
  • Quit option

NOTE: Make sure that the user can enter a max of 20 scores but can end before 20 if they choose to.

Hint: Show your skills by using functions that return values, reference parameters, etc.
Test Program SAMPLE OUTPUT  Enter up to 20 test scores between 0 and 100. If fewer than 20 then enter -1 to quit. 78 Enter another score, or enter -1 to quit: 100 Enter another score, or enter -1 to quit: 95 Enter another score, or enter -1 to quit: 85 Enter another score, or enter -1 to quit: 68 Enter another score, or enter -1 to quit: 100 Enter another score, or enter -1 to quit: 100 Enter another score, or enter -1 to quit: 99 Enter another score, or enter -1 to quit: 73 Enter another score, or enter -1 to quit: 100 Enter another score, or enter -1 to quit: -1 
All of your scores have been entered. 
What would you like to do? Enter the number from the menu below.
1 - Print a list of all scores entered 
2 - Get a report of how many scores less than 70 were entered 
3 - Get a report of how many scores greater than or equal to 90 were entered
4 - Get a report of the average passing score
5 - End 
 1
The scores entered were:  78 100 95 85 68 100 100 99 73 100
 
What would you like to do? Enter the number from the list below.
1 - Print a list of all scores entered 
2 - Get a report of how many scores less than 70 were entered 
3 - Get a report of how many scores greater than 90 were entered
 
4 - Get a report of the average passing score
5 - End 

2 There was 1 score(s) entered that was less than 70..

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions