#include mian() { double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z)#include mian(){ double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z); s=(x+y+z)/3; s=s*10; s=s+0.5; s=(int)s; s=s/10; printf("s=%f\n",s);}

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 09:08:40

#include mian() { double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z)#include mian(){ double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z); s=(x+y+z)/3; s=s*10; s=s+0.5; s=(int)s; s=s/10; printf("s=%f\n",s);}
#include mian() { double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z)
#include
mian()
{
double x,y,z,s;
printf("input x,y,z:\n");
scanf("%lf %lf %lf",&x,&y,&z);
s=(x+y+z)/3;
s=s*10;
s=s+0.5;
s=(int)s;
s=s/10;
printf("s=%f\n",s);
}
这个程序怎么不能运行啊

#include mian() { double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z)#include mian(){ double x,y,z,s; printf("input x,y,z:\n"); scanf("%lf %lf %lf",&x,&y,&z); s=(x+y+z)/3; s=s*10; s=s+0.5; s=(int)s; s=s/10; printf("s=%f\n",s);}
恭喜你中奖了,第二行是:main(),您写错了
C是从main()函数开始编译连接的,如果没有编译器报错
最好写:
void main()