+ 1
What kind of error it is?
2 Réponses
+ 2
You're trying to call a non-static method from a static method. Add a static modifier to your EvenOdd() method on line 15.
+ 1
int n= Convert.ToInt32(Console.ReadLine());
if(n%2==0)
{
Console.WriteLine("{0} is even",n);
}
else
{
Console.WriteLine("{0} is odd",n);
}