So far every line ran. if lets the program choose.
Program.cs
using System;
class Program
{
static void Main()
{
int score = 72;
if (score >= 50)
{
Console.WriteLine("Pass");
}
else
{
Console.WriteLine("Fail");
}
}
}
Output
Pass
The parentheses hold a condition that must produce a bool. If it is true the first block runs; otherwise the else block does.