哪位大神能帮我看看为啥出错
c语言吧
全部回复
仅看楼主
level 2
float weight, volume;
int size, letters;
char name[40];
printf("Hi!What's your first name?\n");
scanf_s("%s", name);
printf("%s,what's your weight in pounds?\n", name);
scanf_s("%f", &weight);
size = sizeof name;
letters = strlen(name);
volume = weight / DENSITY;
printf("Well,%s,your volum is%2.2fcubic feet.\n", name, volume);
printf("Also,your frist name has%dletters,\n", letters);
printf("and we have%dbytes to store it.\n", size);
return 0;
}
用的是vs2017,运行输入名字之后就不显示了如图:
2019年04月01日 11点04分 1
level 2
哪位大神帮我看看什么原因导致的
2019年04月01日 11点04分 2
1