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