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
liraira [26]
3 years ago
5

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

of grades and the number of grades in each letter-grade category as follows: 90 to 100 is a A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F. Use a negative score as a sentinel value to indicate the end of the input. (The negative value is used only to end the loop, so do not use it in the calculations.) For example, if the input is 98 87 86 85 85 78 73 72 72 72 70 66 63 50 -1 the output would be Total number of grades = 14 Number of A's = 1 Number of B's = 4 Number of C's = 6 Number of D's = 2 Number of F's = 1 loop

Computers and Technology
1 answer:
Licemer1 [7]3 years ago
8 0

Answer:

import java.util.Scanner;

public class Program

{

public static void main(String [] Args)

{

int A_grades = 0;

int B_grades = 0;

int C_grades = 0;

int D_grades = 0;

int F_grades = 0;

int count=0;

int max = 0;

int min = 9999999;

int num;

int total = 0;

int smallest = 0;

int largest = 0;

Scanner in = new Scanner(System.in);

System.out.println("Enter exam score as integer percentage in range 0 to 100");

System.out.println("And enter a negative score at the end of the list :");

int score = in.nextInt();

while(score>0)

{

count++;

if(score < 0){ // negative number

break;} // exit the infine loop

else if(score > max){ // find bigger one

max = score;}

else if(score < min) { // find smallest one

min = score;}

total = total + score; // the total for average

if(score <= 50 && score>0)

smallest = score;

if(score > 90 && score <=100)

largest = score;

if(score>=90 && score<=100)

A_grades++;

else if(score>=80 && score<=89)

B_grades++;

else if(score>=70 && score<=79)

C_grades++;

else if(score>=60 && score<=69)

D_grades++;

else if(score>=0 && score<=59)

F_grades++;

score = in.nextInt();

} //end while

System.out.println("Total number of scores is : " + count );

System.out.println("Total Number of each Letter grade : " + count);

System.out.println("Percentage of total for each letter grade : ");

System.out.println("Total number of A grades :"+ A_grades);

System.out.println("Total number of B grades :"+ B_grades);

System.out.println("Total number of C grades :"+ C_grades);

System.out.println("Total number of D grades :"+ D_grades);

System.out.println("Total number of F grades :"+ F_grades);

System.out.println("Lowest Score is :"+smallest);

System.out.println("Highest Score is :"+largest);

System.out.println("Average score : "+ (total / count));

}

}

Explanation:

The Java program is such that functions in this manner, It reads a list of exam scores given as integer percentages in the range 0 to 100. Displays the total number of grades and the number of grades in each letter-grade category as follows: 90 to 100 is a A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F.

See attachment for program output.

You might be interested in
In cell E14, enter a date function that calculates the number of days between the Initial Deadline (cell E10) and the Date Recei
tatuchka [14]

Answer:

The formula to enter in E14 is as follows:

=DAYS(D14,$E$10)

Explanation:

Required

Formula to calculate the number of days between E10 and D14

The syntax to do this is:

=DAYS(end_date,start_date)

So, we have:

=DAYS(D14,E10)

The question requires a mix of relative and mixed references because cell E10 will be constant in calculating the difference for dates in other cells.

In other words, the initial date is constant for all

So, the update formula is:

=DAYS(D14,$E$10)

Notice the $ between in E10; this represents mixed referencing

When dragged to E15 till E68, the formulas in the respective cells will be:

=DAYS(D15,$E$10) .............................. =DAYS(D68,$E$10)

7 0
3 years ago
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of
NeX [460]

The answer is

Recipient's ability to open file

Size of file

Sometimes, it might occur that the email message attachment you’ve sent to someone has an error or is corrupt and thus, limits the recipient ability to open the file. Another factor is the size of the file. All email servers limit the size of the file attached in an email that a recipient can receive mainly because of security reasons. Google Mail, for instance, only allows you to send 25MB only. This might limit the ability to attach files to e-mail messages as well.

3 0
2 years ago
Read 2 more answers
Name all the keys of the home row.
Kaylis [27]

Answer:

Search key, a, s, d, f, g, h, j, k, l, : and ;, ¨ and ´, and the enter key.

5 0
3 years ago
The way a particular application views the data from the database that the application uses is a.
masha68 [24]

The way a particular application views the data from the database that the application uses is a sub-schema.

<h3>What is Database?</h3>

A Database may be defined as a process of collecting data and information that is principally assembled for quick search and recoupment by a computer.

The sub-schema is the reasoning elucidation of that section of the database which is applicable and accessible to a specific application. This type of database is common to two or more applications.

Therefore, the sub-schema is the way through which a particular application views the data from the database that the application uses.

To learn more about Database, refer to the link:

brainly.com/question/26096799

#SPJ4

4 0
1 year ago
EEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIII
OLEGan [10]

Explanation:

hagshshshshshshshvcvgafffffrfggggggggggggcbbbbbbbbbbbbbbccccccccccccbhhhhhhhhh

6 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following operations would best allow you to place 3D building models at their proper height on the terrain (e.g.,
    8·1 answer
  • Which is a description of phishing?
    7·1 answer
  • Microsoft's Xbox operating system provides Xbox programmers with a set of common standards to use to access controllers, the Kin
    15·1 answer
  • Which word processing file that contains text and other
    13·2 answers
  • Complete the following statement: Sustainability is: Choose all that apply.This task contains the radio buttons and checkboxes f
    10·1 answer
  • A common and extremely useful feature of most online dictionaries is
    12·1 answer
  • What was the job of the Committee of Correspondence? WILL GIVE BRANLEST AND 40 POINT
    12·1 answer
  • 1. why is manufacturing considered the biggest contributor to progress
    9·1 answer
  • What is a computer modem?​
    9·1 answer
  • What is folded card publishing?​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!