desislava_topuzakova

04. Number 100...200

Feb 13th, 2021
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class NumberInRange100to200 {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         //цяло число -> int -> вход
  7.         //< 100 -> Less than 100
  8.         //<= 200 -> Between 100 and 200
  9.         //> 200 -> Greater than 200
  10.         int number = Integer.parseInt(scanner.nextLine());
  11.         if(number < 100){
  12.             System.out.println("Less than 100");
  13.         } else if(number <= 200) {
  14.             System.out.println("Between 100 and 200");
  15.         } else {
  16.             System.out.println("Greater than 200");
  17.         }
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment