7th Apr 2022, 4:03 AM
Muhammad Hasnain Raza
Muhammad Hasnain Raza - avatar
2 ответов
+ 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.
7th Apr 2022, 4:20 AM
Yumi
Yumi - avatar
+ 1
int n= Convert.ToInt32(Console.ReadLine()); if(n%2==0) { Console.WriteLine("{0} is even",n); } else { Console.WriteLine("{0} is odd",n); }
10th Apr 2022, 2:32 AM
Jackie
Jackie - avatar