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
You are troubleshooting a Windows workstation that is having problems communicating with the host at IP address 1.2.3.4. What ut
PSYCHO15rus [73]

Answer:

Tracert 1.2.3.4 is the correct answer.

Explanation:

Tracert is the command that is used to trace the track of the packet of the Internet Protocol. That's why when the user troubleshoots their workstation and then the problem will occur at the time of conversation to the host's IP. So, that's why he using the following command of the to track route of the IP packets.

4 0
4 years ago
How to calculate standard deviation on excel?
Anarel [89]
<span>I believe you use the Excel Formula =STDEV( ) and select the range of values which contain the data. This calculates the sample standard deviation (n-1).</span>
5 0
3 years ago
Why would a programmer want to overload operators rather than use regular member functions to perform similar operations?
Harlamova29_29 [7]
The Programmer wants to overload operators rather than use a regular member of the functions to perform similar operations because of two main reasons:
1. For easy and simpler definition of the functions. There would be one pointer who will call the function every time is needed in the program.
2. For easier comparisons of parameters.
4 0
4 years ago
gina wants to add another resistor to this circuit. She wants to ensure that after the new resistor is added, it will all work i
Bas_tet [7]

D) one lead in front of the current resistor, one behind it:

Explanation:

5 0
4 years ago
Read 2 more answers
This is a python program.
denpristay [2]

Answer:

word = input("Type your name: ")

print(len(word))

Explanation:

The len function will count all the chars in the string.

7 0
4 years ago
Other questions:
  • Instructions:Select the correct answer.
    8·1 answer
  • Which of the following is NOT an example of a font style?
    13·1 answer
  • What is diffie-hellman most commonly used for?
    15·1 answer
  • Under the advanced options screen, what startup option should be enabled in order to view what did and did not load during the b
    12·1 answer
  • What are motion graphics?
    9·1 answer
  • Write a SELECT statement that returns the same result set as this SELECT statement. Substitute a subquery in a WHERE clause for
    13·1 answer
  • 6. By default,how the table headings are placed. (2 Points)
    6·1 answer
  • How to hack free fire dimond
    10·2 answers
  • List 4 criteria of power your house with wind
    5·1 answer
  • Question 1 of 1
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!