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
Likurg_2 [28]
3 years ago
6

c++ Write a statement that increments (adds 1 to) one and only one of these five variables: reverseDrivers parkedDrivers slowDri

vers safeDrivers speeders. The variable speed determines which of the five is incremented as follows: The statement increments reverseDrivers if speed is less than 0, increments parkedDrivers if speed is less than 1, increments slowDrivers if speed is less than 40, increments safeDrivers if speed is less than or equal to 65, and otherwise increments speeders.
Computers and Technology
1 answer:
Mazyrski [523]3 years ago
7 0

Answer:

The following statement are:

if(speed < 0) // if statement

{

reverseDrivers++; //if the speed is less than 0, then increment in "reverseDrivers"

}

else if(speed < 1) //else if statement

{

parkedDrivers++; //speed is less than 1, than increments in "parkedDrivers"

}

else if(speed < 40)

{

slowDrivers++; //speed is less then 40, than increment in "slowDriver"

}

else if(speed <= 65)

{

safeDrivers++; //speed is less than or equal to 40, then increment in "safeDriver"

}

else

{

speeders++; //else increment in speeders

}

Explanation:

From the following statement their are certain condition arises

If the speed is less than 0, then increments the “reverseDrivers” variable by 1.

If the speed is less than 1, then increments the “parkDriver” variable by 1.

If speed is less than 40, then increment in "slowDriver" variable by 1.

If speed is less than or equal to 40, then increment in "safeDriver" variable by 1.

Otherwise increment in "speeders"

You might be interested in
How does polymorphism enable you to program "in the general" rather than "in the specific"? Discuss the key advantages of progra
barxatty [35]

Answer:

Explanation:

When programming in an OOP language classes are created to represent real-life objects, people, places etc. from the real world. Programming in the general allows you to cut down your code and making it more efficient by applying the same necessary functions to all of the objects that classify under the same category. For example by programming "in the general" and creating an Animal class you can create all of the functions/behaviors that animals tend to have. Then you can apply these functions/behaviors to various animals such as a Cat, Dog, Horse, etc. But if you program in the specific you cannot apply a Cat class to a Dog since they are not the same thing.

4 0
2 years ago
-1
N76 [4]

Answer:A flowchart is a diagram that depicts the steps involved in solving a problem. The following flowchart shows how to output the multiplication table ( n * 1 to m * 1) of a number, n and m:

3 0
3 years ago
What would you NOT use a router for? *
Alla [95]

Answer:

<h2><u>A</u><u>.</u><u> </u><u>To</u><u> </u><u>run</u><u> </u><u>applications</u><u> </u><u>on</u><u> </u><u>your</u><u> </u><u>computer</u></h2>

3 0
3 years ago
What is one major component that would not be found in a tablet or phone, and how has modern computing made that component less
IRISSAK [1]

Answer:

A hard drive

Explanation:

Since tablets and phones are compact, they are better off not having a big, giant, bulky storage device like hard drives. Modern computing made hard drives less important by developing Solid-State Drives (SSDs) and extremely dense (512 bit) storage that can provide the same if not more storage than a traditional hard drive at the fraction of the size.

5 0
3 years ago
Read 2 more answers
How do you find binary?
trasher [3.6K]

Answer:

To convert integer to binary, start with the integer in question and divide it by 2 keeping notice of the quotient and the remainder. Continue dividing the quotient by 2 until you get a quotient of zero. Then just write out the remainders in the reverse order.

Explanation:

3 0
2 years ago
Other questions:
  • What is the difference between www vs internet in information technology?
    13·1 answer
  • A user reports his or her computer is slow to boot. You check the boot order and determine that the computer is checking the C d
    12·1 answer
  • Vannevar Bush imagined a desktop computing machine that would allow people to access data stored in various information centers
    13·1 answer
  • JPG is considered a lossy file format. What does this mean?
    15·2 answers
  • Technological advances have made cyberbullying
    5·1 answer
  • Q.drtrdyudoijoemrkdf
    6·2 answers
  • Multiple Choice
    8·1 answer
  • What does good time management mean​
    8·2 answers
  • Computer science practical on VB.NET. program 1. program to find the square of a number. write the code achieve it​
    6·1 answer
  • _____ provide a label or explanation of an image or object.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!