码迷,mamicode.com
首页 > 其他好文 > 详细

c的开始,求最大数。

时间:2014-11-20 11:37:44      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:io   sp   for   bs   amp   c   nbsp   return   ca   

#include<stdio.h>

int main ()

{

        int i,x,max=1;

        printf("请输入数字\n");

        for(;;i++)

        {

              scanf("%d",&x);

         if(0==x) break;

         if(max<x)

        {

             max=x;

         }

         printf("最大数=%d\n",max);

  

 

 

       return 0;

      }

       

 

 

 

 

 

}

c的开始,求最大数。

标签:io   sp   for   bs   amp   c   nbsp   return   ca   

原文地址:http://www.cnblogs.com/lipiao/p/4110051.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!