Java examples for java.lang:Math Geometry
is Pythagorean Triplet
//package com.java2s; public class Main { public static boolean isPythagoreanTriplet(int a, int b, int c) { return (isPythagorean(a, b, c) && (a + b + c == 1000)); }/*from ww w. j a va 2s.c o m*/ public static boolean isPythagorean(int a, int b, int c) { return ((a * a) + (b * b)) == (c * c); } }