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
Constraints are a. quantities to be minimized in a linear programming model. b. quantities to be maximized in a linear programmi
svetoff [14.1K]

Answer: D

Explanation:

Constraints are associations between multiple variables which set boundaries for the values these variables can take at the same time. They put limit on values that variables can accommodate.

4 0
3 years ago
How can the two independent clauses below be combined to form a correct complete sentence? Check all that apply.
stepladder [879]
Jonas has homework that isn’t finished.
3 0
2 years ago
Sabian que hay una violadora sexuar el nombre de usario es SASHENKAFASION me acaba de decir que hackio en donde vivo,mi nombre c
grin007 [14]
Gracias por avisar eres muy amable
4 0
3 years ago
In information systems, _____ is information from a system that is used to make changes to input or processing activities.
Tom [10]

Answer:

"Feedback" is the correct answer for the above question.

Explanation:

  • Feedback is used in any information system or any communication system to tells that any process is doing in the right direction.
  • It is used in communication channels to tell the sender that the message is received by the receiver.
  • It is a type of message which is sent by the user to the system that he gets the correct or wrong output by that system.
  • The above question asked about the term which is used in the information system which suggests changing the processing activity. This is known as feedback which is described above.
6 0
3 years ago
How did mechanical clocks assist in completing work? How was work done previously?
lozanna [386]

Answer

Timekeeping has been a part of society since Ancient Egypt. The use of spring-powered mechanisms allowed clocks to be made smaller ... Essentially, the church bells and the mechanical clock now became the monitor of the working day.

Explanation:

4 0
3 years ago
Other questions:
  • What precaution can you take while using a social networking site to prevent a data breach?
    15·1 answer
  • Which of the following savings vehicles usually requires a high minimum balance? ASimple savings account BCertificate of Deposit
    7·1 answer
  • The entire presentation can be seen at a time in __________
    5·1 answer
  • What are the ethical implications of online social media after someone has died
    8·2 answers
  • Software enables users to create documents
    13·1 answer
  • Which city is the largest within the Andean and midlatitude countries? A. Buenos Aires, Argentina B. La Paz, Bolivia C. Santiago
    11·2 answers
  • Write a C++ program that would take 10 integers and outputs mean, median, and range. Create at least three functions: one for so
    7·1 answer
  • 2. Which property is used for hiding text of the textbox?
    14·1 answer
  • If you can name this you get 15 points: ↑↑↓↓←→←→βα
    10·1 answer
  • What is a file path?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!