Advertisement
Vankata17

numsBetween!10;-10

Dec 11th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. package naVankata;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class ZDR {
  6.  
  7.     public static void main(String[] args) {
  8. Scanner scan= new Scanner(System.in);
  9. System.out.print("ENETER NUMBER:  ");
  10. int num = Integer.parseInt(scan.nextLine());
  11. if(num>=-10 && num <=10) {
  12.     System.out.println("OK!"+ num);
  13. }else {
  14.     System.out.println("NO!"+ num);
  15. }
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement