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
artcher [175]
3 years ago
9

A car holds 16 gallons of gasoline and can travel 312 miles before refueling. Write aC++ program that calculates the number of m

iles per gallon the car gets. Display the result on the screen.
Computers and Technology
1 answer:
IgorC [24]3 years ago
6 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables Declaration and initialization

   int no_gallon=16;

   int dis=312;

   // find the miles per gallon

   double mile_gallon=dis/double(no_gallon);

   // print the results

   cout<<"number of gallons: "<<no_gallon<<endl;

   cout<<"distance travel before refueling: "<<dis<<endl;

   cout<<"miles per gallon is: "<<mile_gallon<<endl;

return 0;

}

Explanation:

Declare and initialize the number of gallon and distance travel without refueling. Calculate the miles per gallon by dividing distance with number of gallons.Then print the results.

Output:

number of gallons: 16

distance travel before refueling: 312

miles per gallon is: 19.5

You might be interested in
The __________ clash of clans and candy crush saga are video games that exploit the real world–digital world convergence by buil
solmaris [256]
The  game play of the clash of clans and candy crush saga are video games that exploit the real world–digital world convergence by building huge personal-rewards psychology for players.<span>The Candy Crush game app exploits some well known weaknesses in the human brain to keep us playing</span>
5 0
3 years ago
how do i create a program in little man computer that takes 2 numbers, divides them and then outputs the div and mod?
Sever21 [200]

Answer:

The program then displays to the screen (OUT) the result of taking the remainder (modulus) of dividing the second number into the first number. For example, if the first number entered was 14 and the second number entered was 5 then the program would display 4.

Explanation:

Hope this helps!!!

7 0
3 years ago
As you are planning your informative speech on the prevalence of Internet memes in pop culture and you wonder if your audience w
Tasya [4]

Answer:

i dont get it

Explanation:

what is the question?

4 0
3 years ago
Explain why the cosmic horizon is much smaller than the universe itself
sashaice [31]
The cosmic horizon is what your eye allows you to see, and that is only a small fragment of the universes actual size
3 0
3 years ago
What type of light is commonly used by a plate making unit to expose plates
Margarita [4]

Answer:

ultraviolate light

Explanation: Because the photosensitive material in the plate reacts to the ultraviolate light and causes a chemical change exposing the plate

8 0
3 years ago
Other questions:
  • A company that hires only American Indians is practicing
    5·2 answers
  • Find the simple interest Jay owes on a five-year student loan of $48,000 with an annual interest rate of 5%.
    9·1 answer
  • An algorithmic function that takes an input message of arbitrary length and returns an output of fixed-length is called a(n) ___
    10·1 answer
  • Given the lists list1 and list2 that are of the same length, create a new list consisting of the first element of list1 followed
    12·2 answers
  • 1.6.M - Assignment: Understanding If Else Statements in Python
    7·1 answer
  • Sarah is a busy real estate agent with a growing clientele. She is looking to purchase a new computer and software so that she c
    15·1 answer
  • Write a recursive function is_pow2(n) that returns True if the positive integer n is an integer power of 2, and False otherwise.
    9·1 answer
  • How do I get the bot token for discord? (scripting etc)
    5·1 answer
  • Represent the measuring unit ofcomputer un terms of fration of second​
    13·1 answer
  • Your program has a loop. You want to exit the loop completely if the user guesses the correct word.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!