BasicKnowledgeCSharp/LessonsAndTasks/Task Home 4 - Проверка числа на чётность/Program.cs

21 lines
333 B
C#
Raw Normal View History

2024-10-05 09:59:53 +03:00
using System;
class Program
{
static void Main()
{
int a;
a = int.Parse(Console.ReadLine());
if (a % 2 == 1)
{
Console.WriteLine("Не чётное");
}
else
{
Console.WriteLine("Чётное");
}
Console.ReadKey();
}
}