Advertisement
Dianov

Conditional Statements Advanced - Lab (10. Invalid Number)

Nov 1st, 2020
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace InvalidNumber
  8. {
  9.     class Program
  10.     {
  11.         public static void Main()
  12.         {
  13.             int number = int.Parse(Console.ReadLine());
  14.            
  15.             if (number < 100 || number > 200)
  16.             {
  17.                 if (number == 0)
  18.                 {
  19.                     Console.WriteLine("");
  20.                 }
  21.                 else
  22.                 {
  23.                     Console.WriteLine("invalid");
  24.                 }
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement