Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*Write a program that prompts the user to enter the total number of students first. *Then ask the user to input each students grade and

*Write a program that prompts the user to enter the total number of students first. *Then ask the user to input each students grade and use loop statements to read in each grade. Check input grade to make sure 0<=grade<=100, if the user input any other number, print out warning message and ask the user to input a new grade. *Display the highest score, the lowest score, and the average.

Here is the sample run:

Please input the total number of students: 10

Please input the students grade: 56 23 89 45 96 -45

Grade must between 0 and 100.

Please input another score: 45 12 85 74 65

The highest grade is: 96

The lowest grade is: 12

The average grade is: 59

Note: You do not need to use array to save each input score for this lab. A Single loop to read in each grade, compare with the current highest grade, lowest grade, and calculate the running sum at the same time.

(Java)

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

Students also viewed these Databases questions