C # notes March 3 Compare the size of three numbers

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.