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

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