#include <stdio.h>
int main()
{
int age = 15;
int height = 162;
float weight = 82.5;
char isfat = 'y';
printf("年龄: 15岁 \n", age);
printf("身高: 162CM \n", height);
printf("体重: 82.5KG \n", weight);
printf("是否属于肥胖儿童:%c\n", isfat);
/*%d,%f,%c此类符号在后面会有讲解*/
return 0;
}
%d,%f,%c这些不能删,删了就输出不了
printf("年龄: 15岁 \n", age);
printf("身高: 162CM \n", height);
printf("体重: 82.5KG \n", weight);
注意里面的%d,不能删去的,%d和后面age(整型)的相对应,
#include <stdio.h>
int main()
{
int age = 15;
int height = 162;
float weight = 82.5;
char isfat = 'y';
printf("年龄: 15岁 %d\n", age);
printf("身高: 162CM %d\n", height);
printf("体重: 82.5KG %f\n", weight);
printf("是否属于肥胖儿童:%c\n", isfat);
return 0;
}
//你要输出什么,此题没有涉及到判断,直接输出了