标签:c
#include <stdio.h>
int main()
{
int a[10], i, max,min;
for (i = 0; i<10; i++)
{
printf("num%d=", i + 1);
scanf("%d", &a[i]);
}
max = a[0]; min = a[0];
for (i = 0; i<10; i++)
{
if (a[i]>max) max = a[i];
if (a[i]<min) min = a[i];
}
printf("max=%d\n", max);
printf("min=%d\n", min);
return 0;
}
标签:c
原文地址:http://zhaoguanwen.blog.51cto.com/10824932/1708621