dtalley11

example.java

Jul 1st, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class example {
  4.  
  5.     public static void main(String[] args) {
  6.         int x = Integer.parseInt(args[0]);
  7.         int y = Integer.parseInt(args[1]);
  8.         if (x==y) {
  9.             if (x >25) {
  10.                 System.out.println("x is large, and so is y");
  11.             }
  12.             else {
  13.                 if (x > 15){
  14.                         System.out.println("x still somewhat large");
  15.                     }
  16.                 else {
  17.                     if  (x >= 1) {
  18.                         System.out.println("x positive at least");
  19.                     }
  20.                     else {
  21.                         if (x == 0) {
  22.                             System.out.println("x is 0");
  23.                         }
  24.                         else {
  25.                             if (x < 0) {
  26.                                 System.out.println("x is negitive");
  27.                             }
  28.                             else {
  29.                                 System.out.println("x is not a number");
  30.                             }
  31.                         }
  32.                     }
  33.                 }
  34.             }
  35.         }
  36.         else {
  37.             System.out.println("x is not equal to y");
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment