milesPerGallon2

milesPerGallon2 - << setw(10<< milesPerGallon<<...

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

View Full Document Right Arrow Icon
// file: lab10.cpp // author: j. dzuback // modified: // date: / // Program milesPerGallon reads miles and hours and prints miles // per hour. / #include <iostream> #include <iomanip> using namespace std; u void GetMnP (float&,float&); /* FILL IN the function prototype for GetData */ // FILL IN the Documentation!! / int main () { float miles; float gallons; float milesPerGallon; int count = 0; i cout << fixed << showpoint; do { GetMnP ( miles, gallons); /* FILL IN code to invoke function GetMnG */ milesPerGallon = miles / gallons; cout << setw(10) << miles << setw(10) << 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: << setw(10) << milesPerGallon << endl; count ++; }while (count < 3); return 0; } void GETmnp(float& miles, float& gallons) //***************************************************** { cout << "Enter miles then press enter: "; cin >> miles; cout << endl << "Enter gallon then press enter: "; cin >> gallons; //count++; / /* FILL IN the function heading for GetMnG */ //{while (count < 3) / // Precondition: // Post Condition: / /* FILL IN Code to prompt for miles and gallons */ /* FILL IN Code to read miles and gallons */ }...
View Full Document

This note was uploaded on 02/08/2011 for the course CSC 101 taught by Professor Joedzuback during the Spring '11 term at Union County.

Ask a homework question - tutors are online