Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. double a, b, c, temp;
  5. scanf("%lf %lf %lf", &a, &b, &c);
  6. if (a < b)
  7. {
  8. temp = a;
  9. a = b;
  10. b = temp;
  11. }
  12. if (b < c)
  13. {
  14. temp = b;
  15. b = c;
  16. c = temp;
  17. }
  18. if (a < b)
  19. {
  20. temp = a;
  21. a = b;
  22. b = temp;
  23. }
  24. if (a >= b + c)
  25. {
  26. printf("NAO FORMA TRIANGULO\n");
  27. }
  28. else if (a * a == b * b + c * c)
  29. {
  30. printf("TRIANGULO RETANGULO\n");
  31. }
  32. else if (a * a > b * b + c * c)
  33. {
  34. printf("TRIANGULO OBTUSANGULO\n");
  35. }
  36. else if (a * a < b * b + c * c)
  37. {
  38. printf("TRIANGULO ACUTANGULO\n");
  39. }
  40. if (a == b && b == c)
  41. {
  42. printf("TRIANGULO EQUILATERO\n");
  43. }
  44. else if (a == b || b == c)
  45. {
  46. printf("TRIANGULO ISOSCELES\n");
  47. }
  48. return 0;
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement