C# program to check the given number is even or odd
Program.cs
int n;
Console.Write("Enter a number ");
n = Convert.ToInt32(Console.ReadLine());
if (n % 2 == 0)
{
    Console.WriteLine(n + " is an EVEN number");
}
else
{
    Console.WriteLine(n + " is an ODD number");
}
Output
kodingwindow@kw:~/csharp$ dotnet run
Enter a number 9
9 is an ODD number
kodingwindow@kw:~/csharp$ 
Advertisement