Last active
December 7, 2021 14:02
-
-
Save goldcoders/5144c8778df5fdc62f89434332eb5ebc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Q2 Week2 | |
// No. 2 | |
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
// get the first number and 2nd number | |
// and show result which is greater than the two numbers | |
Console.WriteLine("Enter the first number"); | |
int firstNumber = Convert.ToInt32(Console.ReadLine()); | |
Console.WriteLine("Enter the second number"); | |
int secondNumber = Convert.ToInt32(Console.ReadLine()); | |
if (firstNumber > secondNumber) | |
{ | |
Console.WriteLine("The greater number is {0}", firstNumber); | |
} | |
else | |
{ | |
Console.WriteLine("The greater number is {0}", secondNumber); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment