这输出的怎么会一样呢??求大虾帮助
include <stdio.h>main()
{
int a[10]={1,2,3,4,5,6,7,8,9,10};
int *max,*min;
int i;
for(i=0;i<9;i++)
{
if (a[i]<a[i+1])
*max=a[i+1];
else
{
a[i+1]=a[i];
*max=a[i+1];
}
}
for(i=0;i<9;i++)
{
if (a[i]>a[i+1])
*min=a[i+1];
else
{a[i+1]=a[i];
*min=a[i+1];}
}
puts("The max you want is:");
printf("%d\n",*max);
puts("The min you want is:");
printf("%d\n",*min);
return 0;
}