Guest User

Untitled

a guest
Jan 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import java.Scanner;
  2. class numbertester
  3. {
  4. public static void main (String[] args)
  5. {
  6. int num;
  7. Scanner scan = new Scanner(System.in);
  8. System.out.println("Enter an integer:");
  9. num = scan.nextInt();
  10.  
  11. if ((num < 0));
  12. {
  13. }
  14. System.out.println("The number " +num+"is negative");
  15.  
  16.  
  17.  
  18. else
  19. System.out.println("The number " +num+"is zero or postitive");
  20. }
  21.  
  22. }
Add Comment
Please, Sign In to add comment