#include<iostream.h>
#include<conio.h>
#include<conio.h>
void main()
{
clrscr();
int y,f,i;
cout<<“Enter inches:”;
cin>>i;
y=i/432;
i=i%432;
f=i/12;
i=i%12;
cout<<“Yard=”<<y<<“nFeet=”<<f<<“nInches=”<<i;
getch();
}
翻译自: https://www.thecrazyprogrammer.com/2011/03/c-program-to-convert-given-inches-into.html