public static boolean isTriangle(int a, int b, int c) {
if (a >= b + c || b >= a + b || c >= a + b) {
return false;
} else {
return true;
}
}
public static String determineType(int a, int b, int c) {
if (a == b && b == c & c == a) {
return "Equilateral";
} else if (a == b || b == c || a == c) {
return "Isosceles";
} else if ((a * a) + (b * b) == (c * c) || (b * b) + (c * c) == (a * a) || (a * a) + (c * c) == (b * b)) {
return "Right Angle";
} else {
return "Scalene";
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: