Write a C# Sharp program to check whether a given number is even or odd. code example
Example: check if number is even or odd c#
int i = 5;
if (i % 2 == 0)
{
// even
}
else
{
// odd
}
int i = 5;
if (i % 2 == 0)
{
// even
}
else
{
// odd
}