Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1.         for (int num1 = 0; num1 < nums.length; num1++) {
  2.             for (int num2 = 0; num2 < nums.length; num2++) {
  3.                 for (int num3 = 0; num3 < nums.length; num3++) {
  4.                     for (int num4 = 0; num4 < nums.length; num4++) {
  5.                         int a = nums[num1];
  6.                         int b = nums[num2];
  7.                         int c = nums[num3];
  8.                         int d = nums[num4];
  9.                         if (a != b && a != c & a != d &&
  10.                             b != c && b != d && c != d) {
  11.                             String first = "" + a + b;
  12.                             String second = "" + c + d;
  13.                             if (first.equals(second)) {
  14.                                 System.out.printf("%d|%d==%d|%d\n",
  15.                                     a, b, c, d);
  16.                                 count++;
  17.                             }
  18.                         }
  19.                     }
  20.                 }              
  21.             }
  22.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement