View Code of Problem 90

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.next();
		String[] strings = string.split(",");
		int a = Integer.parseInt(strings[0]);
		int b = Integer.parseInt(strings[1]);
		for(int i = a;i <= b;i++) {
			for(int j = i;j <= b;j++) {
				for(int k = b;k > j;k--) {
					if(i * i + j * j == k * k) {
						System.out.println(i +"^2+"+j+"^2="+k+"^2");
					}
				}
			}
		}
	}
}

Double click to view unformatted code.


Back to problem 90