为何我用模块化做冒泡运行不了,求大神!!
#include<stdio.h>#define N 10
void main()
{
int bubble();
int a[10];
int c;
printf("please put 10 intergets:\n");
scanf("%d",&a[10]);
c=bubble(10);
printf("the max is %d\n",bubble(N));
printf("\n");
}
int bubble(int a[10])
{
int z,j,i;
for(i=0;i<10;i++)
for(j=0;j<10-i-1;j++)
if(a[i]>a[i+1])
{
z=a[i];
a[i]=a[i+1];
a[i+1]=z;
}
for(i=0;i<10;i++)
return z;
}