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
sammy [17]
4 years ago
12

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

s 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:
tensa zangetsu [6.8K]4 years ago
3 0

Answer:

int reverseDrivers ,parkedDrivers ,slowDrivers, safeDrivers ,speeders;

int speed; // variable declaration

if(speed<0) // checking condition

reverseDrivers++; // increment the value by 1

else if (speed<1) // checking condition

parkedDrivers++;// increment the value by 1

else if (speed<40) // checking condition

slowDrivers++;// increment the value by 1

else if(speed<=65) // checking condition

safeDrivers ++;// increment the value by 1

else

speeders++;// increment the value by 1

Explanation:

Following are the description of statement

  • Declared a variable reverseDrivers ,parkedDrivers, slowDrivers ,safeDrivers speeders and speed of integer types. These variables increments its value by 1 according to the condition of the speed variable.
  • Speed variable check the condition of speed.
  • if(speed<0) it increment the value by 1 in the "reverseDrivers" variable.
  • if (speed<1) it increment the value by 1 in the "parkedDrivers" variable.
  • if (speed<40)  it increment the value by 1 in the "slowDrivers" variable.
  • if(speed<=65)  it increment the value by 1 in the "safeDrivers " variable.
  • if all the if block condition fails then control moves to the else block and increment the value by 1 in the "speeders " variable.

You might be interested in
Tech A says that no matter which way the vehicle turns, the inside wheel must always turn less sharply than the outside wheel. T
vodomira [7]
The answer is c because the perpendicular bicector alligns.
5 0
3 years ago
Bob flys a drone which has a 20 megapixel camera attached, what is the definition of "megapixel in this context? Why does it mat
Verizon [17]

Answer:

megapixel refers to the unit of resolution i.e. one million

Explanation:

Interestingly the higher the pixels does not mean higher quality of image, it's more about the camera and it's sensor.

I am a photographer and a licensed drone pilot and have researched the subject to help with camera choice, both DSLR and drone.

5 0
3 years ago
List five ways in which the type declaration system of a language such as Java or C differs from the data definition language us
zhannawk [14.2K]

Answer:

Hi Sevanah! Below are the five main differences between a type declarative language and a data definition language:

A data definition language:

1. define data structure

2. define the column attributes of a table

3. no further classifications

4. The basic commands in a Data Definition language are CREATE, DROP, RENAME, ALTER

5. Scope of variables in data definition languages is limited  

A type declarative language:

1. manipulate the data itself

2. uses functions to add and update the rows of a table

3. further classified into procedural and non-procedural languages

4. The basic commands are INSERT, UPDATE and MERGE

5. Scope of variables in type declarative languages is varied

Explanation:

A data definition language is used to define data structures. It makes use of statements such as create table, alter table to create and alter the database schema to allow it to hold rows of information. A type declarative language such as Java or C is used to manipulate the data itself. For example, insert, update and deletion of rows to the database. Whereas data definition languages define the column attributes of a table, a type declaration language uses functions to add and update the rows of a table. A data definition language does not have any further classification, however a type declarative language can be further classified into procedural and non-procedural languages. The basic commands in a Data Definition language are CREATE, DROP, RENAME, ALTER, whereas the basic commands in a type declarative language are INSERT, UPDATE and MERGE. There is little of no scope of variables in a data definition language, whereas the scope of variables in type declarative languages is varied

8 0
3 years ago
What are the advantage of an e-library​
Semmy [17]

Answer:

Makes it easier to read... summarize cite electronic versions of editions

3 0
1 year ago
The points a b c and d lie on a straight line ab:bd = 1:4
pochemuha

The points a b c and d lie on a straight line ab:bd = 1:4 are A line that extends to infinity on both sides and has no curves is called a straight line.AB:BC=3:4.

<h3>What do you call a straight line?  </h3>

A line is simply an object in geometry denoted as an object with no width that extends on both sides. A straight line is just a line with no curves.

  • AC=AB+BC=3+4=7;  AC:CD=2:1, i.e. AC=2;   because we get 2 different lengths for AC, we change the given ratio AC:CD to an equivalent one with AC=7 .
  • As follows: AC:CD = 2 : 1 = 7 : 3.5 (multiply both sides by 3.5 )   Now we have AC:CD = 7 : 3.5 and AD = AC+CD= 7+3.5 = 10.5,, and the answer is: the ratio  BC:AD = 4:10.5.

Read more about the straight line:

brainly.com/question/3493733

#SPJ1

3 0
3 years ago
Other questions:
  • Mark is learning to make logos. Once he finishes learning, he plans to freelance. Which software is most preferred to create art
    16·1 answer
  • What type of attack intercepts communication between parties to steal or manipulate the data?
    13·1 answer
  • Which method allows a computer to react accordingly when it requests data from a server and the server takes too long to respond
    5·1 answer
  • Producers must understand the marginal benefit of making an additional unit which shows the ...
    5·2 answers
  • A(n) _____________ is a system that prevents a specific type of information from moving between untrusted networks and private n
    9·1 answer
  • Consider an unpipelined or single-stage processor design like the one discussed in slide 6 of lecture 17. At the start of a cycl
    10·1 answer
  • Diverting an attacker from accessing critical systems, collecting information about the attacker's activity and encouraging the
    8·1 answer
  • Computer can do work very___​
    7·2 answers
  • Kelly wants to change the text in a cell so that it is centered instead of left-aligned, where should she look to make this
    8·1 answer
  • Task 2
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!