Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class CheckNumber {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- System.out.print("Enter n: ");
- int n = scan.nextInt();
- if (n >= 100 && n <= 200) {
- System.out.println("The number is within [100; 200]");
- } else {
- System.out.println("The number is beyond [100; 200]");
- }
- }
- }
Add Comment
Please, Sign In to add comment