Write a C++ Program to convert inches to feet yards and inches. Here’s simple Program to convert inches to feet yards and inches in C++ Programming Language.
Here is source code of the C++ Program to convert inches to feet yards and inches. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.
SOURCE CODE : :
/* C++ Program to convert inches to feet yards and inches */
#include<iostream>
using namespace std;
int main()
{
int y,f,i;
cout<<"Enter Inches to Convert ::";
cin>>i;
y=i/432;
i=i%432;
f=i/12;
i=i%12;
cout<<"\nAfter Conversion from inches to feet, yards and inches :: \n";
cout<<"\nYards = "<<y<<"\n\nFeet = "<<f<<"\n\nInches = "<<i<<"\n";
return 0;
}
OUTPUT : :
/* C++ Program to convert inches to feet yards and inches */
Enter Inches to Convert ::500
After Conversion from inches to feet, yards and inches ::
Yards = 1
Feet = 5
Inches = 8
Process returned 0
Above is the source code for C++ Program to convert inches to yards feet and inches which is successfully compiled and run on Windows System.The Output of the program is shown above .
Here is source code of the C++ Program to convert inches to feet yards and inches. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.
SOURCE CODE : :
OUTPUT : :
Above is the source code for C++ Program to convert inches to yards feet and inches which is successfully compiled and run on Windows System.The Output of the program is shown above .
need an explanation for this answer? contact us directly to get an explanation for this answer