#include using namespace std; void input(double& feet, double& inches); double calculation(double& feet, double& inches); double calculations_2(double& feet, double& inches); char output(double& total_meters,double& total_centi, char& again); const double INCHES_TO_FEET = 12; const double CENTI_TO_METERS = 100; const double FEET_TO_METERS = .3048; int main() { double feet = 0; double inches = 0; double total_meters; double total_centi; char again= 'N'; do { input(feet,inches); total_meters=calculation(feet,inches); total_centi = calculations_2(feet, inches); again = output(total_meters, total_centi, again); } while ((again == 'y') || (again == 'Y')); return(0); } void input(double& feet, double& inches) { double ft; double in; cout << "How many feet are there?" << endl; cin >> ft; feet = ft; cout << "How many inches are there?" << endl; cin >> in; inches = in; return; } double calculation(double& feet, double& inches) { double total_feet; double total_meters; double total_centi; int meters; total_feet =(inches / INCHES_TO_FEET)+feet; total_meters = total_feet* FEET_TO_METERS; total_centi = (total_meters * CENTI_TO_METERS); meters = total_meters; return(meters); } double calculations_2(double& feet, double& inches) { double total_feet; double total_meters; double total_centi; int meters; total_feet = (inches / INCHES_TO_FEET) + feet; total_meters = total_feet* FEET_TO_METERS; total_centi = (total_meters * CENTI_TO_METERS); meters = total_meters; total_centi = total_centi - (meters * 100); return( total_centi); } char output(double& total_meters, double& total_centi, char& again) { char another; cout << "The total amount of meters is " << total_meters << "." << endl; cout << "The total amount of centimeters is " << total_centi << "." << endl; cout << "Would you like to make another calculation?" << endl; cin >> another; return(another); }