Write a C # program that determines if a given number is even

int number = Convert.ToInt32 (Console.ReadLine ()); // get the string (Console.ReadLine ()) from the console, then convert it to the integer type int (Convert.ToInt32) and assign the resulting number to the variable number
if (number% 2 == 0) // if the remainder of the division is zero, then a message about the evenness of the number is displayed
Console.WriteLine (“This number is even!”);
else // otherwise an odd message
Console.WriteLine (“This number is NOT even!”);
Console.Read (); // read console (otherwise close)



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.