美文网首页
小练习070

小练习070

作者: 哈迪斯Java | 来源:发表于2023-04-22 09:22 被阅读0次

    public class Demo {
    public static void main(String[] args) {
    for (int a = 1; a <= 100; a++) {
    for (int b = 1; b <= 100; b++) {
    for (int c = 1; c <= 100; c++) {
    if (Math.pow(a, 2) + Math.pow(b, 2) == Math.pow(c, 2)) {
    System.out.println(a + "," + b + "," + c);
    }
    }
    }
    }
    }
    }

    相关文章

      网友评论

          本文标题:小练习070

          本文链接:https://www.haomeiwen.com/subject/vyvhddtx.html