#include <stdio.h>
int main(){
int age = 18;
float height = 1.85;
char unit = 'm';
printf("小明今年18岁\n", "int age = 18");
printf("小明身高1.850000m\n", "int height =1.850000m, unit =%f %c ");
printf("小明现在在慕课网上学习IT技术");
return 0;
}
printf("小明身高1.850000m\n", "int height =1.850000m, unit =%f %c ");中的, "int height =1.850000m, unit =%f %c "沒有執行!!
#include <stdio.h>
int main()
{
int age = 18;
double height =1.85;
char unit = 'm';
printf("小明今年%d岁\n",age);
printf("小明身高%f%c\n",height,unit);
printf("小明现在在慕课网上学习IT技术\n");
return 0;
}
float是用于单精度浮点型
1.85属于双精度浮点型
还有你的格式是错的