[求助]递归算法求数组最小值
请教一个题目:递归算法求数组最小值非常感谢!
void find_min(int *data,int *min,int position)
{
int temp;
if(position<8)
{
if(data[position]<*min)
{
temp=*min;
*min=data[position];
data[position]=temp;
}
position++;
find_min(data,min,position);
}
}
main()
{
int data[8]={25,7,48,37,12,92,86,33};
int min;
min=data[0];
find_min(data,&min,0);
printf("The min is:%d\n",min);
getch();
}