1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#include <iostream>
using namespace std;
void input(int& feet, int& inches);
void chopin(int& feet, int& inches, int& meters, double& centimeters);
void output(double& meters, double& centimeters);
int main()
{
double centimeters, feet, inches, meters;
start:
input(feet, inches); // No matching function for call to 'input'
chopin(feet, inches, meters, centimeters); // No matching function for call to 'chopin'
output(meters, centimeters);
cout << endl;
goto start;
return 0;
}
void input(int& feet, int& inches)
{
cout << "Input the feet and inches." << endl;
cin >> feet >> inches;
}
void chopin(int& feet, int& inches, int& meters, double& centimeters)
{
meters = (0.3048 * feet) + ((12 * inches) * 0.3048);
centimeters = meters * 100;
}
void output(double& meters, double& centimeters)
{
cout << meters << " meters" << endl << centimeters << " centimeters";
}
|