Ask Question

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

+2
Answers (1)
  1. 26 February, 17:06
    0
    Highway:

    cout << "The car can drive " << 20*26.8 << " miles on the highway." << endl;

    Town:

    cout << "The car can drive " << 20*21.5 << " miles in the town." << endl;
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “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. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers