1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bixtya [17]
3 years ago
10

Write a program to read a list of exam scores given as integer percentages in the range 0-100. Display the total number of grade

s in each letter grade defined as follows:90-100 is an A, 80-89 is a B, 70-79 is a C, 60-69 is a D, 0-59 is an F. Use a negative score as a sentinel to indicate the end of the input. (The negative value is used just to end the loop, do not use it in the calculations). Then output the highest and lowest score, and the average score.For example if the input is: 72 98 87 50 70 86 85 78 73 72 72 66 63 85 -1the output would be:Total number of grades = 14Number of As =1Number of Bs = 4Number of Cs = 6Number of Ds = 2Number of Fs = 1The highest score is 98The lowest score is 50The average is 75.5This is what I have so far and it is not working correctly:public static void main(String[] args) {// scannerScanner scnr =new Scanner (System.in);//ints grades and countint x;int A = 0;int B = 0;int C = 0;int D = 0;int F = 0;int count = 1;//int min max totalint min, max;int total = 0 ;//doubledouble average;//prompt user for inputSystem.out.print("Please enter the exam scores as integer ");System.out.print("percentages in the rage 0-100. ");System.out.println("Please end the list with a negative integer.");//scnrx = scnr.nextInt();min = x;max = x;//while loopwhile (x >= 0){x = scnr.nextInt();if (x >= 0){total = total + x;count++;if (x < min)min = x;if (x > min)max = x; }while (x >= 90 && x <= 100) {x = scnr.nextInt();A++;//Grade Bif (x >= 80 && x <= 89)B++;//Grade Cif (x >= 70 && x <= 79)C++;//Grade Dif (x >= 60 && x <= 69)D++;//Grade Fif (x >= 0 && x <= 59)F++;}}// averageaverage = total/count;//results/outputSystem.out.println("Total number of grades: " + count);System.out.println("Number of A's: " + A);System.out.println("Number of B's: " + B);System.out.println("Number of C's: " + C);System.out.println("Number of D's: " + D);System.out.println("Number of F's: " + F);System.out.println("Highest score: " + max);System.out.println("Lowest score: " + min);System.out.println("Average: " + average);}}
Computers and Technology
1 answer:
GrogVix [38]3 years ago
4 0
System out print , 100-5292
You might be interested in
How long does it take to send a 3 MiB file from Host A to Host B over a circuit-switched network, assuming:
yanalaym [24]

Answer:

The answer is 69.3 ms

Explanation:

if 1 MiB = 0.008388608 Gb

then 3 MiB =  3 x 0.008388608 = 0.025165824 Gb.

since the bandwidth is equally shared amongst two users,  each user gets equal share of the bandwidth which is Total Bandwidth/Number of Users.(

The bandwidth for each user = 30.8/2 = 15.4 Gbps.

The time taken for the message to reach from host A to host B = 0.025165824/15.4 s = 0.00163414441 which is = 1.63 ms.

The link connection requires a setup time of 67.7 ms

Therefore,  the net time required is = 67.7 ms +1.63 ms = 69.3 ms.

4 0
3 years ago
An electronic ____ is an application you use to perform numeric calculations and to analyze and present numeric data.
attashe74 [19]

An electronic \sf\purple{spreadsheet} is an application you use to perform numeric calculations and to analyze and present numeric data.

\bold{ \green{ \star{ \orange{Mystique35}}}}⋆

7 0
3 years ago
The most efficient tables in a relational database in terms of storage space have no redundant data and very few null values bec
Nastasia [14]

Answer:

The best answer is "False

Explanation:

relational database uses a structure that allows us to identify and access data in relation to another piece organized into tables in the database.

Clustering similar records together is one way of reducing access time.

4 0
4 years ago
when doing a complex presentation which of the fallowing will be the best tool to begin designing your presentation
qaws [65]

but where are the option bro

7 0
2 years ago
Read 2 more answers
Help me with this please​
slava [35]
<h2>sorry...</h2>

I don't know the answer

3 0
3 years ago
Read 2 more answers
Other questions:
  • ______ is a process that marks the location of tracks and sectors on a disk.
    6·1 answer
  • In traditional programming, probably the most often used error-handling outcome was to ____.
    15·1 answer
  • Why should a person consider doing an apprenticeship?
    7·1 answer
  • Thetremendous diversity of the source systems is the primary reasonfor their complexity. Do you agree
    6·1 answer
  • What could cause a fixed disk error.
    15·1 answer
  • When you search google for​ dishwashers, you are likely to see a number of inconspicuous ads for​ advertisers, including product
    11·1 answer
  • When troubleshooting firewalls, you should never attempt to repeat the problem because you could do more damage. T/F
    6·1 answer
  • Create an old sample dictionary {0:10, 1:20} as follows to store numbers. Write a Python script to ask how many runs from user i
    11·1 answer
  • What kind of company would hire an Information Support and Service employee?
    8·1 answer
  • Universal containers wants internal support requests to be directed to any of the IT reps. They want external support requests t
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!