Calculate how many Btu's of heat are delivered into a house given the number of gallons of oil burned and the efficiency of the furnace.

What will be an ideal response?


```
int main()
{
const double BTU_PER_BAR= 5800000; // energy equivalent of a barrel
const int GAL_PER_BAR = 42; // gallons per barrel
int gallons; // gallons of oil burned
double efficiency; // efficiency of the oil furnace
cout << endl << "How many gallons of oil were burned?=> ";
cin << gallons;
cout << "What is the percent efficiency of the oil furnace?=> ";
cin << efficiency;
double heat = double(gallons) / GAL_PER_BAR * BTU_PER_BAR
* (efficiency / 100.0);
cout << endl << "There were " << heat
<< " Btu's of heat delivered to the house." << endl << endl;
return 0;
}
```

Computer Science & Information Technology

You might also like to view...

Files can be stored in:

a) hard drives b) optical disks c) magnetic tapes d) All of the above

Computer Science & Information Technology

What are two advantages to using inner classes?

What will be an ideal response?

Computer Science & Information Technology

Assuming a signal-to-noise ratio of 30 dB, what is the maximum data rate that can be achieved for the dialup bandwidth illustrated in Figure 10.11?

What will be an ideal response?

Computer Science & Information Technology

What are the characteristics of the Windows 10 Administrator account?

What will be an ideal response?

Computer Science & Information Technology