If Else Statement
using System;
// If-else statement adds a path for the false evaluation of the boolean expression.
class TestIfElse
{
static void Main(string[] args)
{
int first_num = 10;
int second_num = 20;
if (first_num > second_num)
{
Console.WriteLine("First number is greater than Second number");
}
else
{
Console.WriteLine("Second number is greater than First number");
}
Console.ReadLine();
}
}
Output:
Second number is greater than First number