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
Ilya [14]
3 years ago
15

Write a multi-way if/else statement that adds 1 to the variable reverseDrivers if the variable speed is less than 0, adds 1 to t

he variable parkedDrivers if the variable speed is less than 1, adds 1 to the variable slowDrivers if the variable speed is less than 40, adds 1 to the variable safeDrivers if the variable speed is less than or equal to 65, and otherwise adds 1 to the variable speeders.
Computers and Technology
1 answer:
andriy [413]3 years ago
4 0

Answer:

Code in Javascript.

<u>Preconditions: </u>

All the variables are defined and initialized.

if (speed < 0) { <em>// if speed is < 0 then adds 1 to reverse drivers.</em>

   reverseDrivers ++;

} else if (speed < 1) {  <em>// else if speed is < 1 then adds 1 to parked drivers.</em>

   parkedDrivers ++;

} else if (speed < 40) { <em>// else if speed is < 40 then adds 1 to slow drivers.</em>

   slowDrivers ++;

} else if (speed <= 65) { <em>// else if speed is <= 65 then adds 1 to safe drivers.</em>

   slowDrivers ++;

} else { <em>// else if speed is > 65 then adds 1 to speeders.</em>

   speeders++;

}

You might be interested in
Which of these statements about PNG is true?
Amiraneli [1.4K]

Answer:

d

Explanation:

6 0
2 years ago
Read 2 more answers
In what decade was photography invented? the 1800s the 1820s the 1840s the 1860s
frutty [35]

Answer:

In the year 1820's

It is B

4 0
3 years ago
Which icon is greater in file size? (Show your working)
nadya68 [22]

Answer:

the 256 color icon would be greater in file size.

Explanation:

regardless of how many pixels are in the image, file A has 256 colors meaning the computer has to individually load each one of those colors. it'll probably use a lot of ink if you decide to print it, too.

5 0
3 years ago
Create a single line comment that says ""Print results to screen""
levacccp [35]

Answer:

//""Print results to screen""

Explanation:

In c,c++,java,javascript // is used for the single line comment.

syntax:- // comment.

Whatever text that is followed after // is commented means this line will not get executed by the compiler.

Comments are used to explain the code to other person who is working on the code or trying to understand that code.

6 0
3 years ago
QUESTION 11
tino4ka555 [31]

Answer:

x == 32

Explanation:

CODE in Java:

       int x = 32;

       if(x == 32){

           System.out.println("Pass");

       }

       else{

           System.out.println("Fail");

       }

OUTPUT:

Pass

8 0
2 years ago
Other questions:
  • Which best defines the term patch?
    12·1 answer
  • What is the input output ratio if its 12/23
    7·1 answer
  • The _____ helps the project team to identify the main functions or features of the system and the different users or external sy
    15·1 answer
  • The _____ function is a logical function that returns a TRUE value if any of the logical conditions are true and a FALSE value i
    10·1 answer
  • What are 2 plants that grow best in our soil type ​
    9·1 answer
  • Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2
    7·1 answer
  • Next, go to the mw_tour.html file. Within the document head, create links to the mw_layout.css and mw_styles.css style sheet fil
    10·1 answer
  • The method needed to arrange for an object to be notified when a window's close-window button has been clicked is
    6·1 answer
  • How is the bootstrap program started?
    6·2 answers
  • 1. What does a computer
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!