C语言中出现“undeclared identifier”错误怎么解决??下面这个程序哪里出问题了呢? 10
#include<math.h>intmain(){inta1,a2,b1,b2,c1,c2,d1,d2,e1,e2,C;floatA,B;a1=86,a2=81,b1=...
#include<math.h>
int main()
{
int a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,C;
float A,B;
a1=86,a2=81,b1=74,b2=87,c1=92,c2=90,d1=77,d2=62,e1=82,e2=88;
A=(a1+b1+c1+d1+e1)*0.3+(a2+b2+c2+d2+e2)*0.7;
B=(a1+b1+c1+d1+e1+a2+b2+c2+d2+e2)/10;
C=(a1+b1+c1+d1+e1+a2+b2+c2+d2+e2)/10;
printf("total=%.2f\n",A);
printf("average=%.2f\n",B);
printf("average=%d\n",C);
return 0;
} 展开
int main()
{
int a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,C;
float A,B;
a1=86,a2=81,b1=74,b2=87,c1=92,c2=90,d1=77,d2=62,e1=82,e2=88;
A=(a1+b1+c1+d1+e1)*0.3+(a2+b2+c2+d2+e2)*0.7;
B=(a1+b1+c1+d1+e1+a2+b2+c2+d2+e2)/10;
C=(a1+b1+c1+d1+e1+a2+b2+c2+d2+e2)/10;
printf("total=%.2f\n",A);
printf("average=%.2f\n",B);
printf("average=%d\n",C);
return 0;
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询