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

4数最大

时间:2015-03-30 21:02:05      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

  while (true)             {                 int a,b,c,d;                 a = Convert.ToInt32(Console .ReadLine());                 b = Convert.ToInt32(Console.ReadLine());                 c = Convert.ToInt32(Console.ReadLine());                 d = Convert.ToInt32(Console.ReadLine());                 if (a>b)                 {                     if (a>c)                     {                         if (a>d)                         {                             Console.WriteLine(a+"最大");

                        }                         else                         {                             Console.WriteLine(d + "最大");                         }                     }                 }                 else if (b>c)                 {                     if (b>d)                     {                         Console.WriteLine(b + "最大");                     }                     else                     {                         Console.WriteLine(d + "最大");                     }                 }                 else if (c>d)                 {                     Console.WriteLine(c + "最大");                 }                 else                 {                     Console.WriteLine(d + "最大");                 }                 Console.ReadLine();             }

4数最大

标签:

原文地址:http://www.cnblogs.com/Mr-xue/p/4378920.html

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