fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. Scanner in = new Scanner(System.in);
  14. float num = in.nextFloat();
  15. if(num == 0.0)
  16. {
  17. System.out.println("zero");
  18. }
  19. else if(num < 0.0){
  20. if(Math.abs(num) < 1){
  21. System.out.println(" negative small");
  22. }
  23. else if(Math.abs(num) > 1000000)
  24. System.out.println(" negative large");
  25. else
  26. System.out.println("negative");
  27. }
  28. else{
  29. if(num < 1){
  30. System.out.println("postitve small");
  31.  
  32. }
  33. else if(num > 1000000)
  34. System.out.println("positive large");
  35.  
  36. else
  37. System.out.println("positive");
  38. }
  39.  
  40. }
  41. }
Success #stdin #stdout 0.12s 37048KB
stdin
0.5
stdout
postitve small