Advertisement
bacco

Number checker

May 18th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _12_Number_checker
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             try
  10.             {
  11.                 int n = int.Parse(Console.ReadLine());
  12.                 Console.WriteLine("It is a number.");
  13.             }
  14.             catch (Exception)
  15.             {
  16.                 Console.WriteLine("Invalid input!");
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement