#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int centimeters; //variable to store centimeters total
float inches;
float yards;
float feet;
float decimal;
cout << "Enter total centimeters and press enter "; //prompts user to enter total centimeters
cin >> centimeters; //stores value entered by user
cout <<endl<< centimeters << " centimeters = "; //output the value of centimeters and the equal sign
inches = (centimeters * (0.3937));
inches = ceil(inches);
cout << inches << " inches " <<endl; //output inches
cout<<inches << " inches is: " ;
yards = inches / 36;
decimal= yards-long(yards); // get the decimal part which is later converted to feet
cout << yards-decimal << " yard(s) ";//output yards
feet = (decimal * 3);
decimal= feet-long(feet); // get the decimal part which is later converted to inches
cout << feet-decimal << " feet (foot) "; //output feet
inches=(decimal * 12);
cout << inches << " inch (es) " <<endl<<endl; //output inches
system("pause");
return 0;
}