gascheck - cin >> fuel_remaining; cout <<...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// gascheck.cpp / #include <iostream.h> # // function prototypes / int main() { double miles_remaining, fuel_remaining, mpg, fuel_miles; cout << "How many miles are you from the next gas station? "; cin >> miles_remaining; cout << "How much fuel do you have left (in gallons)? ";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin >> fuel_remaining; cout << "What is your average miles to the gallon? "; cin >> mpg; fuel_miles = fuel_remaining * mpg; return 0; } // end of main function...
View Full Document

This note was uploaded on 06/20/2011 for the course COMPUTING 379 taught by Professor Dr.anoopsarkar during the Spring '11 term at American College of Computer & Information Sciences.

Ask a homework question - tutors are online