Contenido del Curso
C# Basics
C# Basics
else Keyword Practice
Write a condition to check if the number num
is even or odd. If the number is even, output "Even", otherwise "Odd".
main
- We can determine whether a number is even by verifying if its remainder, resulting from division by
2
, equals zero; - In code the condition will be
x % 2 == 0
wherex
is the number to be checked.
main
¿Todo estuvo claro?