Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- double a, b, c, temp;
- scanf("%lf %lf %lf", &a, &b, &c);
- if (a < b)
- {
- temp = a;
- a = b;
- b = temp;
- }
- if (b < c)
- {
- temp = b;
- b = c;
- c = temp;
- }
- if (a < b)
- {
- temp = a;
- a = b;
- b = temp;
- }
- if (a >= b + c)
- {
- printf("NAO FORMA TRIANGULO\n");
- }
- else if (a * a == b * b + c * c)
- {
- printf("TRIANGULO RETANGULO\n");
- }
- else if (a * a > b * b + c * c)
- {
- printf("TRIANGULO OBTUSANGULO\n");
- }
- else if (a * a < b * b + c * c)
- {
- printf("TRIANGULO ACUTANGULO\n");
- }
- if (a == b && b == c)
- {
- printf("TRIANGULO EQUILATERO\n");
- }
- else if (a == b || b == c)
- {
- printf("TRIANGULO ISOSCELES\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement