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
What are personal skills?
jok3333 [9.3K]

Answer:

Basically what you are good at

Explanation:

5 0
3 years ago
Sub to the channel plz plz
Hunter-Best [27]

Answer:

um

Explanation:

6 0
2 years ago
Read 2 more answers
50 POINTS! What can be viewed in the Tasks folder? Check all that apply.
Rom4ik [11]

1, 2, and 4 :))) good luck

6 0
3 years ago
Read 2 more answers
What is the size of the key space if all 8 characters are randomly chosen 8-bit ascii characters?
Slav-nsk [51]
21...............................
4 0
3 years ago
What does configsys mean​
Delvig [45]

Answer:

Definition - What does CONFIG. ... SYS is a configuration file on DOS systems. It is a text file that contains the settings and commands to load drives in a DOS system. This is a primary configuration file for OS/2 and DOS OS. This file was introduced in DOS and is replaced for 32-bit Windows versions with CONFIG.

Explanation:

6 0
3 years ago
Other questions:
  • ________ is used to store programs and instructions that are automatically loaded when the computer is turned on.
    14·1 answer
  • According to the family life course development framework, the __________ stage of the family life cycle comes to an end with th
    7·1 answer
  • What economic measure is at the highest level since the Great Depression?
    12·1 answer
  • Convert 234.43 (base 7) to base 10
    7·1 answer
  • At an uncontrolled intersection, you should yield to the car on the right. True or false.
    10·2 answers
  • If an attacker decides to implement a less obvious port-scan, or stealth attack, which of the following techniques would be appr
    14·1 answer
  • The phrase has become an Internet buzz word. It refers to a top-level domain name for communications organizations.TrueFalse
    12·1 answer
  • A technician removes the cap from the brake fluid reservoir and finds that the rubber boot in the cap is swollen. technician a s
    8·1 answer
  • Is badlion safe and how ?
    14·1 answer
  • What is the main function of processing unit​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!