#include int *p,*q;void fun(int a[],int n){p=q=a;for(int i=0;iif(*pif(*q>a[i]) q=&a[i];}}void main(){int i,n,a[1000];scanf("%d",&n);for(i=0;iscanf("%d",&a[i]);fun(a,n);printf("最大值: %d\n最小值: %d",*p,*q);}
//运行示例: