#include
double average(int n) { int i; double s,x;
for ( i=0,s=0;i s/=n; return s; } void main() { int n; double a; printf("请输入有几门课程:"); scanf("%d",&n); a=average(n); printf("%.2lf\n",a); }
s/=n; return s;
}
void main() { int n; double a;
printf("请输入有几门课程:"); scanf("%d",&n); a=average(n); printf("%.2lf\n",a);