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
A company needs to store its documents in one place, share news and information with all staff, and allow access for employees w
Alenkasestr [34]
C - An Intranet will give access to all employees within the company, whether they work from home or at the office.
4 0
2 years ago
Read 2 more answers
Fill in the missing step in the following deadlock situation. Two users from the local board of education are each running a pro
Softa [21]

Answer:

b. P2 requests drive 2 and gets it.

Explanation:

Two users from the local board of education are each running a program (P1 and P2), and both programs will eventually need two DVD drives to copy files from one disc to another. Only two DVD-R drives are available and they’re allocated on an "as requested" basis. Soon the following sequence transpires: P2 requests drive 2 and gets it.

7 0
3 years ago
In C++, objects instantiated on the stack must be returned to program memory through the explicit use of the delete keyword.
Lady_Fox [76]

Answer:

b. False.

Explanation:

Delete function not used to remove data stored on the stack. It is only used to free memory on the heap. The C++ is programming language used to develop operating systems.

8 0
2 years ago
A user called to inform you that the laptop she purchased yesterday is malfunctioning and will not connect to her wireless netwo
Aloiza [94]

Answer:

B. Have the user press the appropriate function key combination to enable the wireless radio and then attempt to connect to the wireless network.

Explanation:

Every more often than not, users may experience wireless connection problems. How they respond to these issues solely depends on various factors. When a user like this has issues connecting to the network, first on the list of proper troubleshooting procedures is to check whether the wireless adapter or the function key that turns the wireless radio connection on is toggled on. Sometimes the most obvious causes are the hardest to see. The user should check this first because it will save him or her lots of troubleshooting time if the switch was simply physically disabled.

6 0
3 years ago
For this step, submit your work in the programming environment by running your code, checking your code for a score. The score y
34kurt

A sample HTML code that contains headers, paragraph tags, hyperlinks is

  • <h1> This is a header </h1>
  • <h2> This is a subtitle heading </h2>
  • <p> This is a paragraph </p>
  • <a href=”www.brainly.com”> Brainly Website </a>

<h3>What is HTML?</h3>

This is the building block of a website and is an acronym that means Hypertext Markup Language.

The HTML code that can be used to add a sample image is: "<img src="pic_Brainly.jpeg" alt="Brainly" width="500" height="333">

The src code means the specific location of the external resource

The width and height show how tall and wide the image would be.

The alt shows the alternative information for the image that can be seen when a person hovers over the image on the website.

Read more about HTML and CSS here:

brainly.com/question/24051672

#SPJ1

3 0
2 years ago
Other questions:
  • You have to communicate a signal in a language that has 3 symbols A, B and C. The probability of observing A is 50% while that o
    11·1 answer
  • How do you read a column
    8·1 answer
  • The first computer (the eniac was how big
    8·1 answer
  • What are 2 plants that grow best in our soil type ​
    9·1 answer
  • Of the sequences listed below, which shows the correct order of the steps in the incident management workflow: (1) authenticate
    14·1 answer
  • What percent of the internet is the deep web?
    14·1 answer
  • NEED BY 15 MINUTES PLEASE! WILL MARK BRAINLIEST!You can create special effects in an image using a camera or a photo-editing too
    5·1 answer
  • Arrange the binary number in increasing order of their arithmetic output in the decimal number system ?
    9·1 answer
  • How is binary used in pixels and in sound?
    5·2 answers
  • Which of the following is the system of rules and structure governing
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!