1 namespace ConsoleApplication8
2 {
3 class Program
4 {
5 static void Main(string[] args)
6 {
7 Console.WriteLine("我可以帮你比较三个数字的大小,请输入第一个数字");
8 int noone = Convert.ToInt32(Console.ReadLine());
9 Console.WriteLine("请输入第二个数字");
10 int notwo = Convert.ToInt32(Console.ReadLine());
11 Console.WriteLine("请输入第三个数字");
12 int nothree = Convert.ToInt32(Console.ReadLine());
13
14 if (noone > notwo)
15 {
16 if (noone > nothree)
17 {
18 Console.WriteLine("当前最大的数字为{0}", noone);
19 }
20 else if (notwo < nothree)
21 {
22 Console.WriteLine("当前最大的数字为{0}", nothree);
23 }
24
25 }
26 else if (notwo > noone)
27 {
28 if (notwo > nothree)
29 {
30 Console.WriteLine("当前最大的数字为{0}", notwo);
31 }
32 else if (nothree > noone)
33 {
34 Console.WriteLine("当前最大的数字为{0}", nothree);
35 }
36 }
37 else if (nothree > noone)
38 {
39 if (nothree > notwo)
40 {
41 Console.WriteLine("当前最大的数字为{0}", nothree);
42 }
43 else if (notwo > noone)
44 {
45 Console.WriteLine("当前最的的数字为{0}", notwo);
46 }
47 }
48 Console.ReadKey();
49 }
50 }
51 }