// This program will prompt for an individual's daily miles driven and their auto's mpg. // It will then calculate how much it will cost the person for gas to drive their car for a week. #include using namespace std; double Weekly_Cost(int miles, double mpg); // function prototype int main() { int daily_miles; double cost, auto_mpg; cout << "Please enter your daily miles and mpg " << endl; cin >> daily_miles >> auto_mpg; cost = Weekly_Cost(daily_miles, auto_mpg); cout << endl << " If you drive your car " << daily_miles << " miles per day " << "and your car's mpg is " << auto_mpg << endl; cout << " you can expect to pay " << cost << " dollars for gas at $3.85 per gallon. " << endl<< endl; } // calculate the weekly cost of driving your car and return that value to the calling fnct. double Weekly_Cost( int miles, double mpg) { double weekly_cost; weekly_cost = ((miles * 7) / mpg) * 3.85; return weekly_cost; }