Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  sss.cpp
Language: C/C++
Code:
#include <iostream>
#include <cmath>
using namespace std;

int main()

{     
double cm, yard, feet, inch;
     
cout << "cm : ";     
cin >> cm;     
yard = cm * 0.0109361;     
feet = (yard - round(yard)) * 3;     
inch = (feet - round(feet)) * 12;
     
cout << round(yard) << " yard(s) " << round(feet) << " feet(foot), and " << round(inch) << " inch(es)."<< endl;

     
return 0;

}
          
Comments: