不知道怎么修改错误
程序代码:
#include<stdio.h> #define NUMBER 6 float comparison(double[],int); int main (void) { float array[]={0.1,0.2,0.3,0.4,0.5,0.6}; comparison(array,NUMBER); printf("max=%f\n",comparison(array,NUMBER)); return 0; } float comparison(float array[],int n) { int i,max; for(i=1,max=array[0];i<n;i++) if (max<array[i]) max=array[i]; return max; }