Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace EvenNumber
- {
- class Program
- {
- static void Main()
- {
- int num = int.Parse(Console.ReadLine());
- while (num % 2 != 0)
- {
- Console.WriteLine("Please write an even number.");
- num = int.Parse(Console.ReadLine());
- }
- Console.WriteLine($"The number is: {Math.Abs(num)}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement