#include
#define N 5
int main()
{
int x[N],max,min,i;
printf("请输入%d个数组元素(每输入一个按一次回车):\n",N);
for(i=0;i
max=min=x[0];
for(i=0;i
if(x[i]
if(x[i]>max)
max=x[i];
}
printf("max=%d,min=%d\n",max,min);
return 0;
}
#define N 10
main()
{ int a[N]={ …… },i,max,min;
max=min=a[0];
for( i=1;i
if( min>a[i] )
min=a[i];
}
printf("max=%d, min=%d\n",max,min);
}
a[i] = {};
void find()
{
int i,max,min;
max=min=a[0];
for(i=1;i
if(a[i]>max)
max=a[i];
if(a[i]
}
}