Complete the code to check if a number is positive.
if (number [1] 0) { Console.WriteLine("Positive number"); }
The symbol > means 'greater than', so this checks if number is greater than zero.
Complete the code to print "Even" if the number is divisible by 2.
if (number % 2 [1] 0) { Console.WriteLine("Even"); }
The '==' operator checks if the remainder is zero, meaning the number is even.
Fix the error in the conditional to check if age is at least 18.
if (age [1] 18) { Console.WriteLine("Adult"); }
The '>=' operator means 'greater than or equal to', which checks if age is 18 or more.
Fill both blanks to check if a number is between 10 and 20 (inclusive).
if (number [1] 10 && number [2] 20) { Console.WriteLine("Between 10 and 20"); }
The first blank uses '>=' to check number is at least 10, the second uses '<=' to check number is at most 20.
Fill all three blanks to print "Teenager" if age is between 13 and 19 inclusive.
if (age [1] 13 && age [2] 19) { Console.WriteLine([3]); }
The first blank checks if age is at least 13, the second checks if age is at most 19, and the third prints the string "Teenager".