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
blagie [28]
3 years ago
9

A car with a 20-gallon gas tank averages 23.5 miles per gallon when driven in town and 28.9 miles per gallon when driven on the

highway. write a program that calculates and displays the distance the car can travel on one tank of gas when driven in town and when driven on the highway
Computers and Technology
1 answer:
katovenus [111]3 years ago
5 0
Highway: 
<span>cout << "The car can drive " << 20*26.8 << " miles on the highway." << endl; </span>
<span>Town: </span>
<span>cout << "The car can drive " << 20*21.5 << " miles in the town." << endl;</span>
You might be interested in
For python how do I ask the user how many numbers they want to enter and then at the ending add those numbers up together?
Digiron [165]

I am not too familiar with the Python language, but the algorithm would be something like this:

1. create a variable for the sums of the number

2. read in how many numbers the user wants to enter (let's call it N)

and then create a for loop:

for N times

read in the next number

increase the sum variable by that number

Hopefully this helps!

8 0
3 years ago
What is the purpose of a mail merge field?
Alex73 [517]

Answer:

to set up placeholders in a document where data will be inserted

4 0
3 years ago
Read 2 more answers
Recall that the name of a transport-layer packet is segment and that the name of a link-layer packet is frame. What is the name
AlladinOne [14]

Answer:

A network-layer packet is a data gram. A router forwards a packet based on the packet's IP (layer 3) address. A link-layer switch forwards a packet based on the packet's MAC (layer 2) address.

Explanation:

When the end system receives the unstructured bit stream from the physical wire, each layer removes the header information applicable to it until the application receives the data.

1. An application, such as an email program, creates data that will be sent by an end user, such as an email message. The Application layer places a header (encapsulation) field that contains information such as screen size and fonts, and passes the data to the Presentation layer.

2. The Presentation layer places layer 6 header information. For example, the text in the message might be converted to ASCII. The Presentation layer will then pass the new data to the Session layer (layer 5).

3. The Session layer follows the same process by adding layer 5 header information, such as information that the Session layer will manage the data flow, and passes this data to the Transport layer (layer 4).

4. The Transport layer places layer 4 information, such as an acknowledgement that the segment was received in the header, and passes it to the Network layer (layer 3).

5. The Network layer places layer 3 header information, such as the source and destination address so the Network layer can determine the best delivery path for the packets, and passes this data to the Data Link layer (layer 2).

6. The Data Link layer places layer 2 header and trailer information, such as a Frame Check Sequence (FCS) to ensure that the information is not corrupt, and passes this new data to the Physical layer (layer 1) for transmission across the media.

7. The bit stream is then transmitted as ones and zeros on the Physical layer. It is at this point that the Physical layer ensures bit synchronisation. Bit synchronisation will ensure the end user data is assembled in the correct order it was sent.

8. Steps 1 through 7 occur in reverse order on the destination device. Device B collects the raw bits from the physical wire and passes them up the

Data Link layer. The Data Link layer removes the headers and trailers and passes the remaining information to the Network layer and so forth until data is received by the Application layer. Eventually, Device B will receive an email notification displaying a message to indicate that a new email message has been received.

5 0
3 years ago
For each of the following languages, state with justification whether it isrecognizableor unrecognizable.(a)LHALT≥376={(〈M〉, x)
Scilla [17]

Answer:

See the picture attached

Explanation:

4 0
3 years ago
A laptop computer is smaller than desktop computer. True or false
alina1380 [7]

Answer:

true

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What is the purpose of a title slide on power point
    14·2 answers
  • After a robbery, what is the purpose of conducting a neighborhood canvass?
    9·1 answer
  • How many seconds are required to make a left turn and join traffic?​
    11·2 answers
  • Which command displays the contents of the NVRAM?
    13·1 answer
  • is there an app i can use to make a picture appear in the corner of a video then disappear after being up for a second?
    6·2 answers
  • Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
    15·1 answer
  • Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. What will be the ou
    14·1 answer
  • In the table below, identify the data type that would be most suitable for the second field.
    10·2 answers
  • Different algorithms can be made to complete the same task in different ways.
    8·2 answers
  • DUE SOON NEED HELP FAST!!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!