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
Using a windows computer, to expand a branch of the folder tree you would _____.
s344n2d4d5 [400]
A folder can include everything from documents and music, to applications [like Word or Excel or your favorite browser]. But computer folders can also contain other folders, lots of them, and those sub-folders can contain folders of their own. This is the called folder tree. The trunk of the tree is the Desktop. Then there are several folders like Recycle Bin, Control Panel,..The most important branch is the one called ‘Libraries’. Here are the Photos, Music, Videos,...
<span>Using a windows computer, to expand a branch of the folder tree you would right click </span>beside various folders and drives to expand the folder tree.

8 0
3 years ago
Which loan type requires you to make loan payments while you’re attending school?
Levart [38]
<span>A:Unsubsidized federal loan</span>
7 0
3 years ago
Folktales have characters with good or bad traits here are some good wise clever kind hardworking I have too add one more good t
s2008m [1.1K]

Answer: good generous bad greedy

Explanation:

5 0
3 years ago
Calvin works as a graphic designer for an advertising company. He has to submit a large number of prints quickly because the dea
choli [55]

Answer:

The correct answer would be, Laser Printers.

Explanation:

There are a lot of printers that are used to print out a document, or file, or image, or anything you want on a paper. Printers are called the output device of the computer system as it is used to get the output from the computer.

The most important types of printers are Laser Printers, Inkjet Printers, Dot Matrix Printers, etc.

Laser printers are considered to be the fastest printers among all. These printers also give a high quality print out in just a blink of an eye. So these printers are used to print documents which are too lengthy and require a quick print out. So Laser printers will help Calvin in meeting his deadline.

6 0
3 years ago
When using a line graph, why is it inportant to only graph 1 - 3 series of data?. A. A line graph in Microsoft Excel will not al
ElenaW [278]
The most necessary point you need to follow when using a line graph, is to make your graph readable. So, the reason why is it inportant to only graph 1 - 3 series of data is that more than 3 series of data causes too many lines on the graph, which makes ti confusing to read. The last option is the correct one.
8 0
3 years ago
Other questions:
  • Which of the following situations would not require knowledge of networking?
    6·1 answer
  • Diagnosing is solving the problem, and trouble shooting is figuring out what the problem is.
    15·1 answer
  • Which of the following is not part of active listening?
    6·2 answers
  • Quiz
    6·2 answers
  • At what x position are the ellipses drawn??? thanks ♡​
    6·1 answer
  • Which value can be entered to cause the following code segment to display the message "That number is acceptable."? ____.
    15·1 answer
  • I need help getting earbuds please help
    11·2 answers
  • How are programs and algorithms related? A program is a part of an algorithm. They are not connected at all. An algorithm is a p
    12·1 answer
  • HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HEL
    15·2 answers
  • • Comments are blank which can be blank entered into documents
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!