Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package MisterV;
- import java.util.*;
- public class posneg {
- public posneg() {
- // TODO Auto-generated constructor stub
- }
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- System.out.println("Please input a number");
- Scanner scan = new Scanner(System.in);
- int x = scan.nextInt();
- if(x>0) {
- System.out.println("The number is a positive number");
- }else if(x==0) {
- System.out.println("The number is a neutral number");
- }
- else {
- System.out.println("The number is a negative number");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement