Advertisement
Sher123

Untitled

Sep 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1.  
  2. package MisterV;
  3. import java.util.*;
  4.  
  5. public class posneg {
  6.  
  7. public posneg() {
  8. // TODO Auto-generated constructor stub
  9. }
  10.  
  11. public static void main(String[] args) {
  12. // TODO Auto-generated method stub
  13. System.out.println("Please input a number");
  14. Scanner scan = new Scanner(System.in);
  15. int x = scan.nextInt();
  16. if(x>0) {
  17. System.out.println("The number is a positive number");
  18. }else if(x==0) {
  19. System.out.println("The number is a neutral number");
  20. }
  21. else {
  22. System.out.println("The number is a negative number");
  23. }
  24.  
  25.  
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement