C++ Program to convert given inches into equivalent yard,feet and inches

#include<iostream.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();
}

1 thought on “C++ Program to convert given inches into equivalent yard,feet and inches”

Leave a Comment

Your email address will not be published. Required fields are marked *