Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // (a ≠ b ≠ c ≠ d)
- for (int a = 0; a < numbers.length; a++) {
- for (int b = 0; b < numbers.length; b++) {
- if (a != b) {
- for (int c = 0; c < numbers.length; c++) {
- if (a!= c && b != c) {
- for (int d = 0; d < numbers.length; d++) {
- if (a != d && b != d && c != d) {
- String left = "" + numbers[a] + numbers[b];
- String right = "" + numbers[c] + numbers[d];
- if (left.equals(right)) {
- foundStucks = true;
- System.out.printf("%d|%d==%d|%d\n", numbers[a], numbers[b], numbers[c], numbers[d]);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement