C++ Program to convert inches to feet yards and inches

By | 24.12.2016

Convert inches to feet yards and inches


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 .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post….

4.4 9 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Asima

Ya inches ma kasa convert hua ha

Sunil

here the conversion of inches to yard is wrong. As 1 yard = 36 inches