Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.Scanner;
- class numbertester
- {
- public static void main (String[] args)
- {
- int num;
- Scanner scan = new Scanner(System.in);
- System.out.println("Enter an integer:");
- num = scan.nextInt();
- if ((num < 0));
- {
- }
- System.out.println("The number " +num+"is negative");
- else
- System.out.println("The number " +num+"is zero or postitive");
- }
- }
Add Comment
Please, Sign In to add comment