package com.company;
import java.util.Scanner;
public class ForDemo3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
System.out.println("请输入100以内的数范围:");
int s = sc.nextInt();
if (s > 0 && s <= 100) {
int count = 0;
for (int i = 1; i <= s; i++) {
for (int j = 1; j < s; j++) {
for (int k = j; k < s; k++) {
if (i * i + j * j == k * k) {
System.out.println(i + "," + j + "," + k);
count++;
}
}
}
}
} else {
System.out.println("输入有误");
}
}
}
}