#include<stdio.h>
float score[2][5]
int r,c
void main()
{
float highest(float array[2][5]);
int i,j;
for(i=0;i<2;i++)
for(j=0;j<5;j++)
scanf("%f",&score[i][j]);
printf("%f %d %d",highest(score),r,c);
}
float highest(float array[2][5])
{
int i,j;
float max;
max=array[0][0];
for(i=0;i<2;i++)
for(j=0;j<5;j++)
if(array[i][j]>max)
{
max=array[i][j];
r=i+1;
c=j+1;
}
return max;
}
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1.c
C:\Users\HP\Desktop\函数复杂\1.c(3) : error C2054: expected '(' to follow 'score'
C:\Users\HP\Desktop\函数复杂\1.c(3) : error C2085: 'r' : not in formal parameter list
C:\Users\HP\Desktop\函数复杂\1.c(4) : error C2085: 'c' : not in formal parameter list
C:\Users\HP\Desktop\函数复杂\1.c(4) : error C2143: syntax error : missing ';' before 'type'
C:\Users\HP\Desktop\函数复杂\1.c(5) : error C2085: 'main' : not in formal parameter list
C:\Users\HP\Desktop\函数复杂\1.c(5) : error C2143: syntax error : missing ';' before '{'
C:\Users\HP\Desktop\函数复杂\1.c(24) : error C2065: 'r' : undeclared identifier
C:\Users\HP\Desktop\函数复杂\1.c(25) : error C2065: 'c' : undeclared identifier
执行 cl.exe 时出错.
1.obj - 1 error(s), 0 warning(s)
求助大佬这个程序该怎么改???要运用函数