Yachkov

Number in range

Jan 24th, 2021 (edited)
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel.Design;
  3. using System.Globalization;
  4. using System.Reflection;
  5. using System.Security.Cryptography;
  6.  
  7. namespace SomeExcercises
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int randomNumber = int.Parse(Console.ReadLine());
  14.  
  15.             if (randomNumber >= -100 && randomNumber <= 100 && randomNumber != 0)
  16.             {
  17.                 Console.WriteLine("Yes");
  18.             }
  19.             else
  20.             {
  21.                 Console.WriteLine("No");
  22.             }
  23.  
  24.         }
  25.  
  26.     }
  27. }
  28.  
  29.  
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment