这里出现的错误应该如何修改Missing;before type
#include <stdio.h>struct project
{
int prnum;
char prname[15];
int prgrade;
};
struct std{
int num;
char name[15];
struct project math;
struct project english;
struct project c;
struct project maogai;
struct project PE;
}student[10];
double aver(int num)
{
int i;
for(i=0;i<10;i++)
{
if(num==student[i].num ) break;
}
double a=(double)(student[i].englishgrade+student[i].maogaigrade+student[i].mathgrade+student[i].PEgrade+student[i].cgrade)/5;
return (a);
}
int main( )
{
int num;
scanf("%d",&num);
printf("学号为%d五门平均成绩为%3.1f",num,aver(num));
return 0;
}
这是错误类型
error C2143: syntax error : missing ';' before 'type'
error C2065: 'a' : undeclared identifier