SHARE
TWEET

Untitled

a guest Jun 25th, 2017 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;          
  2. public class Program
  3. {
  4.     public static void Main()
  5.     {
  6.     try
  7. {
  8.    Console.Write("Enter even number: ");
  9.    var n = int.Parse(Console.ReadLine());
  10.             if (n % 2 == 0) {break;}
  11.     Console.WriteLine("The number is not even.");
  12. }
  13. catch
  14. {
  15.    Console.WriteLine("Invalid number.");
  16. }
  17.  
  18. }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top