#include <stdio.h>
int main() {
int angle1, angle2, angle3;
// Prompt the user to input three angles
printf("Enter the first angle: ");
scanf("%d", &angle1);
printf("Enter the second angle: ");
scanf("%d", &angle2);
printf("Enter the third angle: ");
scanf("%d", &angle3);
// Check if the angles form a valid triangle
if (angle1 <= 0 || angle2 <= 0 || angle3 <= 0) {
printf("Error: The angles must be positive.\n");
} else if (angle1 + angle2 + angle3 != 180) {
printf("Error: The angles do not form a valid triangle.\n");
} else {
// Determine the type of triangle
if (angle1 < 90 && angle2 < 90 && angle3 < 90) {
printf("The triangle is Acute.\n");
} else if (angle1 == 90 || angle2 == 90 || angle3 == 90) {
printf("The triangle is Right.\n");
} else {
printf("The triangle is Obtuse.\n");
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBhbmdsZTEsIGFuZ2xlMiwgYW5nbGUzOwogICAgCiAgICAvLyBQcm9tcHQgdGhlIHVzZXIgdG8gaW5wdXQgdGhyZWUgYW5nbGVzCiAgICBwcmludGYoIkVudGVyIHRoZSBmaXJzdCBhbmdsZTogIik7CiAgICBzY2FuZigiJWQiLCAmYW5nbGUxKTsKICAgIHByaW50ZigiRW50ZXIgdGhlIHNlY29uZCBhbmdsZTogIik7CiAgICBzY2FuZigiJWQiLCAmYW5nbGUyKTsKICAgIHByaW50ZigiRW50ZXIgdGhlIHRoaXJkIGFuZ2xlOiAiKTsKICAgIHNjYW5mKCIlZCIsICZhbmdsZTMpOwogICAgCiAgICAvLyBDaGVjayBpZiB0aGUgYW5nbGVzIGZvcm0gYSB2YWxpZCB0cmlhbmdsZQogICAgaWYgKGFuZ2xlMSA8PSAwIHx8IGFuZ2xlMiA8PSAwIHx8IGFuZ2xlMyA8PSAwKSB7CiAgICAgICAgcHJpbnRmKCJFcnJvcjogVGhlIGFuZ2xlcyBtdXN0IGJlIHBvc2l0aXZlLlxuIik7CiAgICB9IGVsc2UgaWYgKGFuZ2xlMSArIGFuZ2xlMiArIGFu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