bool condition = true;
if(condition)
var t = "The condition its true";
else
var f = "The condition its false";
// We dont need to use the '{' because it's just 1 change
if c#
int a = 5;
int b = 10;
if (b > a) //true
{
b = b - a;
}
if c#
int time = 22;
if (time < 10)
{
Console.WriteLine("Good morning.");
}
else if (time < 20)
{
Console.WriteLine("Good day.");
}
else
{
Console.WriteLine("Good evening.");
}
if else c#
int a = 5;
int b = 10
if (a > b) //false
{
b = b - a;
}
else
{
a = a + b;
}