C语言题库第四套,自己编的程序总是提示错误(自己编的程序为fun下面的分支)#include<stdio.h>#include<conio.h>#include<stdlib.h>#define N 5double fun (int w[][N]){ int a,b; a=0; b=0; double r; r=0; while (a<5) { while (b<5) {r+=w[a][b]; b++;} a++; } r=r/(N*N); return r;}void main(){ FILE *wf; int a[N][N]={0,1,2,7,9,1,9,7,4,5,2,3,8,3,1,4,5,6,8,2,5,9,1,4,1}; int i, j; double s; system("CLS"); printf("*****The array*****\n "); for (i=0; i<N; i++) { for (j=0;j<N;j++) {printf("%4d ",a[i][j]);} printf("\n "); } s=fun(a); printf("*****THE RESULT*****\n "); printf("The sum is : %lf\n ",s);/******************************/ wf=fopen("out.dat","w"); fprintf (wf,"%lf",s); fclose(wf);/*****************************/}错误为:D:\KSWJJ\24000001\prog1.c(10) : error C2143: syntax error : missing ';' before 'type'D:\KSWJJ\24000001\prog1.c(11) : error C2065: 'r' : undeclared identifier
不是,中文的逗号不是那个样子
追答最好把代码贴上来