22 lines
453 B
C#
22 lines
453 B
C#
namespace EvenOrOddExtention
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
int input = 105;
|
|
Console.WriteLine(input.EvenOrOdd());
|
|
}
|
|
}
|
|
static class EvenOrOddExtention
|
|
{
|
|
public static string EvenOrOdd(this int input)
|
|
{
|
|
if (input % 2 != 0)
|
|
{
|
|
return "Odd";
|
|
}
|
|
return "Even";
|
|
}
|
|
}
|
|
} |