2006.10.23(17)

来源:互联网 发布:中海达gps怎么导出数据 编辑:程序博客网 时间:2024/05/21 09:19
#include<stdio.h>
main()
{
int m,temp;
temp=0;
clrscr();
printf("This program finds the largest integer in a list./n");
printf("Enter 0 to signal the end of the list./n");
while(1)
{
printf("?");
scanf("%d",&m);
if(m==0) break;
if(m>temp)temp=m;
}
printf("The largest value is %d",temp);
getch();
}