不知道题主是不是这个意思
这是它的代码
#include <stdio.h>
int main()
{
int t, max = 0;
int n = 0;
printf("想要输入多少个整数:");//限制给出数的个数
scanf("%d", &n);
while (n)
{
scanf("%d", &t);
if (t > max)
{
max = t;
}
n--;
}
printf("其中的最大值为:%d", max);
return 0;
}