Docsity

Lab Exercise for Computing Average, Max, and Min Scores, Lab Reports of Computer Science

Toggle sidebar
bg1
Lab 3 โ€“ Average, Max, and Min
Comp 150/170
10 points
You are to write a program that accepts a set of test scores from the user and reports which is the
highest, lowest, and the average of all the test scores. The program will allow the user to keep
entering scores until a negative number is entered.
Below is an example of how your program should work.
Please enter your test scores:
Score 1? 70
Score 2? 82
Score 3? 93
Score 4? 65
Score 5? 88
Score 6? -1
The highest score is 93.
The lowest score is 65.
The average score is 79.6.
Note that the final score is not counted when determining the lowest score or the average. Also
the precision (number of digits after the decimal point) of the average should be limited to 1
decimal point.
Turn in a printout of your program at the beginning of the next class period.

Partial preview of the text

Download Lab Exercise for Computing Average, Max, and Min Scores and more Lab Reports Computer Science in PDF only on Docsity!

Lab 3 โ€“ Average, Max, and Min Comp 150/ 10 points

You are to write a program that accepts a set of test scores from the user and reports which is the highest, lowest, and the average of all the test scores. The program will allow the user to keep entering scores until a negative number is entered.

Below is an example of how your program should work.

Please enter your test scores: Score 1? 70 Score 2? 82 Score 3? 93 Score 4? 65 Score 5? 88 Score 6? -

The highest score is 93. The lowest score is 65. The average score is 79.6.

Note that the final score is not counted when determining the lowest score or the average. Also the precision (number of digits after the decimal point) of the average should be limited to 1 decimal point.

Turn in a printout of your program at the beginning of the next class period.