Advertisement
ad2bg

InvalidNumber

Oct 28th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. namespace InvalidNumber
  2. {
  3.     using System;
  4.  
  5.     class InvalidNumber
  6.     {
  7.         static void Main()
  8.         {
  9.             var num = int.Parse(Console.ReadLine());
  10.             var inRange = (num >= 100 && num <= 200) || num == 0;
  11.             if (!inRange)
  12.             {
  13.                 Console.WriteLine("invalid");
  14.             }
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement