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

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