daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top