Код: Выделить всё
class Program
{
public void CheckEvenOdd(int i)
{
bool CheckEvenOdd = i % 2 == 0;
}
public static void Main(string[] args)
{
Program program = new Program();
program.CheckEvenOdd(0);
}
public static void Main2(String[] args)
{
int i;
Console.Write("Enter a number: ");
Console.ReadLine();
bool CheckEvenOdd = !(CheckEvenOdd = true);
if (CheckEvenOdd)
{
Console.WriteLine("Number is even.");
Console.ReadLine();
}
else
{
Console.WriteLine("Number is odd.");
}
}
}
Буду признателен за любую помощь.
Подробнее здесь: https://stackoverflow.com/questions/790 ... -correctly