if, else if and else
Branch on a boolean condition.
Example
int score = 72;
if (score >= 90) Console.WriteLine("A");
else if (score >= 70) Console.WriteLine("B");
else Console.WriteLine("C");Exercise
Else branch.
if (x) {} {}
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.