Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Y01matrix {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a = Integer.parseInt(scanner.nextLine());
- int b = Integer.parseInt(scanner.nextLine());
- int c = Integer.parseInt(scanner.nextLine());
- int d = Integer.parseInt(scanner.nextLine());
- for (int i = a; i <= b; i++) {
- for (int j = a; j <= b; j++) {
- for (int k = c; k <= d; k++) {
- for (int l = c; l <= d; l++) {
- if ((i!=j)&&(k!=l)&&(i+l==j+k)){
- System.out.println(""+i+j+"");
- System.out.println(""+k+l+"");
- System.out.println();
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment