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\",&centimeters);

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;

}

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.SolutionThe foll

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site