Advertisement
Kuncavia

InvalidNumber

Nov 27th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1. using System;
  2.  
  3. class InvalidNumber
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         double num = double.Parse(Console.ReadLine());
  8.         var inRange = (num >= 100 && num <= 200) || num == 0;
  9.         if (!inRange)
  10.             Console.WriteLine("invalid");
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement