Skip to content

Instantly share code, notes, and snippets.

@goldcoders
Created December 7, 2021 14:07
Show Gist options
  • Save goldcoders/2630d15f2f781187ed0200bdb9571c77 to your computer and use it in GitHub Desktop.
Save goldcoders/2630d15f2f781187ed0200bdb9571c77 to your computer and use it in GitHub Desktop.
// 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