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.6 13 votes
Article Rating
Category: Basic Programs C++ Programming Tags:

About Tunde A

My name is Tunde Ajetomobi, a Tech Enthusiast and Growth Hacker. I enjoy creating helpful content that solves problem across different topics. Codezclub is my way of helping young aspiring programmers and students to hone their skills and find solutions on fundamental programming languages.

Subscribe
Notify of
guest

5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Asima

Ya inches ma kasa convert hua ha

Kashif

Is ne 500 inches ko 8 inches me convert kya he🤣🤣🤣

Kartik

Inch chor Pura conversation hi Galt h😂😂

Sunil

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

Prabhakar rayal

Divide i by 36 instead of 432