Write a program to prompt the user to input herhis height an
Write a program to prompt the user to input her/his height and print it on the screen in ft and inches.
C program. I would appreciate some help.
Solution
The following program can be used to display the user input in ft and inches.
#include<studio.h>
int main()
{
Int centimeters;
float feet,inch,total;
printf(\"Enter height in centimeters;\ \");
scanf(\"%d\",¢imeters);
total = centimetres*100*100/2.54;
feet = total / 12;
inch = total - feet * 12;
printf(\"your height is %f feet %f inches\",feet,inch);
return 0;
}
