import [Link].
Scanner;
public class MjTriangle {
public static void main(String[] args) {
Scanner mj = new Scanner([Link]);
try {
[Link]("Enter the name of your triangle: ");
String name = [Link]();
[Link]("Enter the values of interior angle: ");
int a = [Link]();
int b = [Link]();
int c = [Link]();
[Link]("Angle #1 = " + a);
[Link]("Angle #2 = " + b);
[Link]("Angle #3 = " + c);
int sum = a + b + c;
boolean triangle = (sum == 180);
[Link](name + ": " + triangle);
int result = 180 - sum;
[Link]("Result = " + result);
boolean acute = false, obtuse = false, right = false;
if (triangle) {
if (a < 90 && b < 90 && c < 90) {
acute = true;
} else if (a == 90 || b == 90 || c == 90) {
right = true;
} else if (a > 90 || b > 90 || c > 90) {
obtuse = true;
}
}
[Link]("Acute: " + acute);
[Link]("Obtuse: " + obtuse);
[Link]("Right: " + right);
[Link]("Congratulations!");
}
catch(Exception e){
[Link]("INCORRECT INPUT!");
}
}
}