Last active
December 7, 2021 14:09
-
-
Save goldcoders/fa4acd573f34ab45f546f49c18f60561 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Q2 Week 2 | |
// No. 4 | |
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Enter a number: "); | |
int number = Convert.ToInt32(Console.ReadLine()); | |
if (number % 2 == 0) | |
{ | |
Console.WriteLine("The number is even."); | |
} | |
else | |
{ | |
Console.WriteLine("The number is odd."); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment