不知道楼主是不是这个意思?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int array[3], *arrayPtr[3];
int min, i;
for (i = 0; i < 3; i++)
{
scanf ("%d", &array[i]);
arrayPtr[i] = &array[i];
}
min = *arrayPtr[0];
for (i = 1; i < 3; i++)
{
if (min > *arrayPtr[i])
min = *arrayPtr[i];
}
printf("%d\n", min);
system ("pause");
return 0;
} |