veronikaaa86

04. Number 100...200

May 15th, 2021
790
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ConditionalStatements;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P04Number100To200 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int num = Integer.parseInt(scanner.nextLine());
  10.  
  11.         //Less than 100
  12.         //Between 100 and 200
  13.         //Greater than 200
  14.  
  15.         if (num < 100) {
  16.             System.out.println("Less than 100");
  17.         } else if (num <= 200) {
  18.             System.out.println("Between 100 and 200");
  19.         } else {
  20.             System.out.println("Greater than 200");
  21.         }
  22.     }
  23. }
  24.  
RAW Paste Data