1 namespaceConsoleApplication82 {3 class Program4 {5 Static voidMain (string[] args)6 {7Console.WriteLine ("I can help you compare the size of three numbers, please enter the first number");8 intNoone =Convert.ToInt32 (Console.ReadLine ());9Console.WriteLine ("Please enter a second number");Ten intNotwo =Convert.ToInt32 (Console.ReadLine ()); OneConsole.WriteLine ("Please enter a third number"); A intNothree =Convert.ToInt32 (Console.ReadLine ()); - - if(Noone >notwo) the { - if(Noone >nothree) - { -Console.WriteLine ("the current largest number is {0}", noone); + } - Else if(Notwo <nothree) + { AConsole.WriteLine ("the current largest number is {0}", nothree); at } - - } - Else if(Notwo >Noone) - { - if(Notwo >nothree) in { -Console.WriteLine ("the current largest number is {0}", notwo); to } + Else if(Nothree >Noone) - { theConsole.WriteLine ("the current largest number is {0}", nothree); * } $ }Panax Notoginseng Else if(Nothree >Noone) - { the if(Nothree >notwo) + { AConsole.WriteLine ("the current largest number is {0}", nothree); the } + Else if(Notwo >Noone) - { $Console.WriteLine ("The current maximum number is {0}", notwo); $ } - } - Console.readkey (); the } - }Wuyi}
C # notes March 3 Compare the size of three numbers