Q:

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

belongs to collection: C++ Basic Solved Programs

0

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.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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 .

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Basic Solved Programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C++ Program to raise any number X to power... >>
<< C++ Program to Find Sum and Average of three numbe...