borkins

05. Invalid Number

Mar 26th, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. /**
  2.  * Project: Complex_Conditions - created by borkins on 2017-03-26.
  3.  */
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class _05_InvalidNumber
  8. {
  9.     public static void main(String[] args)
  10.     {
  11.         Scanner console = new Scanner(System.in);
  12.        
  13.         int num = Integer.parseInt(console.nextLine());
  14.        
  15.         if (num != 0 && !(num >= 100 && num <= 200))
  16.         {
  17.             System.out.println("invalid");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment