#include <stdio.h>
int main()
{
int i,x,max;
printf("input the number!\n");
scanf("%d",&x);
max=x;
for(i=1;i<=9;i++)
{
printf("input the number!\n");
scanf("%d",&x);
if(max<x)max=x;
}
printf("max integer is %d!\n",max);
}
编写一C语言程序,从键盘输入10个整数,求出它们中最大的一个数并输出。(请不要使用数组或指针)。输入要求:每输入一个整数前,要有提示信息“input the number\n“
最新推荐文章于 2024-04-20 17:04:08 发布