Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
230 B

#include <stdio.h>
#define CM_PER_INCH 2.54
int main (void) {
float inches;
printf("Enter your height in inches: ");
scanf("%f", &inches);
printf("Your height in cm is %.2f\n", inches * CM_PER_INCH);
return 0;
}