#include const double INCHES_PER_FOOT = 12.0; void explainProgram() { cout << "This program will convert a measurement" << endl << "in feet to inches." << endl; } double getFeet() { cout << "enter feet: "; double numFeet; cin >> numFeet; while (numFeet < 0.0) { cout << "must be positive, please re-enter: "; cin >> numFeet; } return numFeet; } double convertFeetToInches(double measurementInFeet) { double measurementInInches = measurementInFeet * INCHES_PER_FOOT; return measurementInInches; } void outputResults(double localFeet, double localInches) { cout << "the measurement in feet is: " << localFeet << endl; cout << "the measurement in inches is: " << localInches << endl; cout << "Bye!" << endl; } int main() { //explain program to user explainProgram(); //get measurement in feet double measurementInFeet = getFeet(); //calculate the measurement in inches double measurementInInches = convertFeetToInches(measurementInFeet); //output both measurements outputResults(measurementInFeet, measurementInInches); }