Finding the Biggest of Two Numbers in C# – Programming, Pseudocode Example, C# Programming Example
C# Console If Else Statement

Finding the Biggest of Two Numbers in C#

This program finds  the greatest of the two numbers entered on the console screen:

 

The user enters two numbers by Console.ReadLine(). Console.ReadLine () reads the value of  string type from the console. Then Convert.ToInt32 method converts the string value to int value. Finally if statement compares two numbers with greater operand

C# Code:

 

Output:

Online Code:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.