Created
December 7, 2021 14:07
-
-
Save goldcoders/2630d15f2f781187ed0200bdb9571c77 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 Week 2 | |
// No 3. | |
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
// get the first number and 2nd number | |
Console.WriteLine("Enter the first number"); | |
int firstNumber = Convert.ToInt32(Console.ReadLine()); | |
Console.WriteLine("Enter the second number"); | |
int secondNumber = Convert.ToInt32(Console.ReadLine()); | |
// show which is the lesser number | |
if (firstNumber < secondNumber) | |
{ | |
Console.WriteLine("The lesser number is {0}", firstNumber); | |
} | |
else | |
{ | |
Console.WriteLine("The lesser number is {0}", secondNumber); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment