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
Which of the following statements about Java Class Libraries is false: a. Java class libraries consist of classes that consist o
blondinia [14]

Answer:

Statement D is false

D. Java class libraries are not portable = FALSE

Explanation:

Because java class library are portable and JVM (java virtual machine) makes java class library and other java codes portable and platform independent and JVM act as a OS or imaginary CPU for that code.

8 0
3 years ago
simplify the expression below and state the value of m for which the simplified expression is not defined 2m² + m - 15/ m² - 9​
motikmotik

Answer:

  • The simplified expression is: \frac{2m-5}{m-3}
  • The simplified expression is undefined for m=3

Explanation:

The given expression is:

\frac{2m^2+m-15}{m^2-9}

The numerator can be siplified by using factorization and denominator will be simplified using the formula

a^2-b^2 = (a+b)(a-b)

So,

= \frac{2m^2+6m-5m-15}{(m)^2-(3)^2}\\=\frac{2m(m+3)-5(m+3)}{(m-3)(m+3)}\\=\frac{(2m-5)(m+3)}{(m-3)(m+3)}\\=\frac{2m-5}{m-3}

A fraction is undefined when the denominator is zero. In order to find the value of m on which the simplified fraction will be undefined we will put denominator equal to zero.

So,

m-3 = 0 => m = 3

Hence,

  • The simplified expression is: \frac{2m-5}{m-3}
  • The simplified expression is undefined for m=3
7 0
3 years ago
Vices for a research paper
muminat
Advice?
find a topic that can work well with you’re writing about so you get the detailed analysis
4 0
3 years ago
• What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in
lions [1.4K]

Answer:

Advantages of both circuit switched networks and TDM are given below:

Explanation:

Advantages of circuit switched network over packet switched network:

  • Circuit switched network has the advantage of being physically connected and having a dedicated channel for communication between the sender and the receiver which also makes it more reliable. Packet switched networks do not have a dedicated channel hence, they are not that reliable.
  • Circuit switched networks are used for voice calls because there is no timing jitter or delay in these types of networks while packet switched networks do not offer this advantage.

Advantages of TDM over FDM in a circuit switched network:

  • TDM is time division multiplexing i.e. multiple information is sent in different time intervals but on the same frequency. While FDM sends information using different frequencies. So, the advantage of using TDM is that the information will be sent from the sender to the receiver using only a single frequency.
  • Using TDM, bandwidth is saved because it only sends information on a single frequency unlike FDM.
  • In TDM, there is low chance of interference between signals since they are sent in different time intervals from the sender to the receiver. While FDM has a higher chance of interference.
4 0
3 years ago
etwork behavior analysis system __________ sensors are typically intended for network perimeter use, so they are deployed in clo
jeka94

Answer:

"Inline" is the correct answer.

Explanation:

  • Network behavior analysis (NBA)  or Analysis of network activity seems to be the technique to observe traffic trends that aren't groups or sets throughout the cable network's everyday traffic.
  • Simplest terms, this is the organization's effort to define network anomalies outside pure congested traffic expect a seamless.

So that the above is the correct answer.

6 0
3 years ago
Other questions:
  • Design a 4-bit register that can accept an input from the user and store the accepted input. The 4-bit register will operate in
    6·1 answer
  • This is a free point thing!! I am giving 100 points!! Anyone wanna talk!!!!
    11·2 answers
  • How to turn a flash drive into a bluetooth adapter?
    13·1 answer
  • Which of the following is NOT true about RMI? RMI uses the socket connection, including opening and closing the socket. RMI allo
    8·1 answer
  • The city government of Los Angeles recently upgraded its information technology infrastructure​ and, for the first​ time, implem
    14·1 answer
  • 30 POINTS! PLEASE ANSWER QUICK!!!
    12·1 answer
  • How to connect xbox one controller
    5·1 answer
  • If you are trying to improve your budget and spending, which option would save you the most money?
    13·2 answers
  • Select the correct answer.
    7·2 answers
  • Which of the following is an input device on a toaster?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!