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.

19 lines
284 B

  1. #include <stdio.h>
  2. #include <string.h>
  3. int main (void) {
  4. float height;
  5. char name[21];
  6. printf("Give your heigth in cm: ");
  7. scanf("%f", &height);
  8. printf("Give your name: ");
  9. scanf("%20s", name);
  10. printf("%s, you are %.3f m tall\n", name, height/100);
  11. return 0;
  12. }