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...

The field that is used to relate records in a second related table is the ________ key

A) inclusive B) exclusive C) foreign D) primary

Computer Science & Information Technology

What is the different between a goal and a task? How do they relate to technology?

What will be an ideal response?

Computer Science & Information Technology