weixin_慕函数3216848
2020-04-11 14:07
# include (stadio.h); int main( ); { int age=15; print("%d","15"); int height=162cm; print("%d","162cm"); float weight=82.5kg; print("%f",weight); return 0; }
代码写错了,大概意思有了,还缺一句“是肥胖儿童"
stadio,改为stdio
print,改为printf
#include <stdio.h> 头文件后面不写分号
int main()主函数后面不写分号
int、float跟数字
你可以这样写:
#include <stdio.h>
int main()
{
int age=15;
int height=162;
float weight=82.5;
//char cm,Kg;
printf("小明年龄%d岁\n",age);
printf("身高%dcm\n",height);
printf("体重%fKg\n",weight);
printf("是否属于肥胖儿童:yes!\n");
return 0;
}
#include <stdio.h>
int main( )
{
int age=15;
printf("%d \n",age);
int height=162;
printf("%d \n",height);
float weight=82.5;
printf("%f",weight);
return 0;
}
C语言入门
926021 学习 · 20793 问题
相似问题
回答 3
回答 5