veronikaaa86

05. Number 100...200

Mar 11th, 2023
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package conditionalStatements;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P05Number100To200 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int num = Integer.parseInt(scanner.nextLine());
  10.  
  11.         if (num < 100) {
  12.             System.out.println("Less than 100");
  13.         } else if (num <= 200) {
  14.             System.out.println("Between 100 and 200");
  15.         } else {
  16.             System.out.println("Greater than 200");
  17.         }
  18.     }
  19. }
  20.  
Add Comment
Please, Sign In to add comment