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