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
Kitty [74]
3 years ago
8

Write a computer program that determines how many grades are between 0 and 19.

Computers and Technology
1 answer:
True [87]3 years ago
7 0

Answer:

public class nnn {

   public static void main(String[] args) {

       int [] examScores = {31, 70, 92, 5, 47, 88, 81, 73, 51, 76, 80, 90, 55, 23, 43,98,36,87,22,61, 19,69,26,82,89,99, 71,59,49,64};

       int zeroTo19 = 0;

       int nineteenTo39 = 0;

       int fortyTo59 = 0;

       int sixtyTo79 = 0;

       int eightyTo100 = 0;

       for(int i =0; i<examScores.length; i++){

           if(examScores[i]<=19){

               zeroTo19++;

           }

           else if(examScores[i]>19&&examScores[i]<=39){

               nineteenTo39++;

           }

           else if(examScores[i]>39&&examScores[i]<=59){

               fortyTo59++;

           }

           else if(examScores[i]>59&&examScores[i]<=79){

               sixtyTo79++;

           }

           else {

               eightyTo100++;

           }

       }

       System.out.println("0 - 19 is "+zeroTo19);

       System.out.println("20 - 39 is "+nineteenTo39);

       System.out.println("40 - 59 is "+fortyTo59);

       System.out.println("60 - 79 is "+sixtyTo79);

       System.out.println("80 - 100 is "+eightyTo100);

   }

}

Explanation:

  • This has been solved with Java
  • Create an array of the exam scores
  • Create new variables for each of the score range
  • Use multiple if statements as u loop through the array to determine the range of scores
  • Finally outside the loop print them variables out
You might be interested in
Consider a network of 8 routers connected together to provide more than one path of connectivity between host A and host B at tw
ser-zykov [4K]

Answer:

Option C is the correct option to the following question

Explanation:

Because there are not any limits is required of sending data and packets between host A and host B by the routers and the router permit more than one paths between the hosts for the establishment of the connectivity st two distinct locations in the routing protocol. The router transmits the packets between the hosts that is produced by link-state protocol.

5 0
3 years ago
What does it mean to “declare a variable”? create a variable use a variable share a variable modify a variable
lara [203]

You are defining the variable

6 0
3 years ago
Read 2 more answers
Unwanted emails are called:malware,phishing, spam or virus
Colt1911 [192]
1. Spam
2. Phishing
3. True
3 0
3 years ago
Help me please and thanks
Yuri [45]

Answer:

b

Explanation:

6 0
4 years ago
g Assume that this program is run on a processor with data cache of size big enough that the entire array arr can fit in the cac
Dimas [21]

Answer:

A. 2

Explanation:

The food function in the C source code uses two for loop statements to fill and array of size 100 with 100 values ranging from 1 to 100 and the second to get the total sum to the values in the array. With this, two program paths are created.

7 0
3 years ago
Other questions:
  • Algorithm for converting decimal into binary.
    7·1 answer
  • Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
    8·2 answers
  • Kuta software infinite pre- algebra multiplying polynomial and a monomial find product answer key
    14·1 answer
  • What is the term for sending emails that imitate legitimate companies?
    6·2 answers
  • What is the name of the file manager in Microsoft Windows. The file manager used in Microsoft Windows is?
    12·2 answers
  • A student that earns a well qualified score on an ap exam would receive a ___
    13·1 answer
  • . ____________is/are the JSP ImplicitObject(s).sessionapplicationconfigAll of GivenNone of Given
    9·1 answer
  • A computer byte is the amount of data (measured in bits) that CPU can manipulate at one time/
    8·1 answer
  • ______ is a customer-facing CRM application.<br><br> FAQ<br><br> Search<br><br> SFA<br><br> E-mail
    6·1 answer
  • REPORT THIS USER. HE'S SHOWING HIS YK WHAT TO EVERYONE INCLUDING ME. HIS ACCOUNT PROFILE IS IN THE PICTURE BELOW
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!