myrdok123

05. Number 100 And 200

Sep 20th, 2024
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. package ConditionalStatements;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Number100And200_05 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int number = Integer.parseInt(scanner.nextLine());
  10.  
  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. }
Advertisement
Add Comment
Please, Sign In to add comment