66 888
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #47533 in C for Michael Ross

Question #47533
Write a c program that converts feet to inches and centimeters to meters. Thanks
Expert's answer
#include <stdio.h>
#include <stdlib.h>
int main()
{
//1 foot = 12 inch
int f,in;
float cm,m;
printf("Enter feet value: ");
scanf("%d",&f);
in = f*12; //foot to inches
printf("in %d foot: %d inches ", f, in);
    printf("\n\nEnter centimetre value: ");
    scanf("%f",&cm);
m = cm/100; //cm to meters
    printf("in %4.2f cm: %4.2f meters\n ", cm ,m);
system("pause");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions