//PythagTriples.java // for each p>q // p^2-q^2, 2pq, p^2+q^2 is a Pythagorean triple import java.awt.*; import javax.swing.*; public class PythagTriples { public static void main (String[] args) { String input; int maxP; int a, b, c; input = JOptionPane.showInputDialog("Max range of integers","10"); maxP = Integer.parseInt(input); for (int p=2; p<=maxP; p++) for (int q=1; q