ThunDerStorm26

Number 100 ... 200

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