fork download
  1. #include <stdio.h>
  2. int main() {
  3. int a, b, c;
  4. scanf("%d", &a);
  5. scanf("%d", &b);
  6. scanf("%d", &c);
  7. if (a > 0 && b > 0 && c > 0 && a < b + c && b < a + c && c < a + b) {
  8. if (a == b && b == c) printf("%s", "Triangulo equilatero.");
  9. else printf("%s", (a == b || b == c || c == a) ? "Triangulo isosceles." : "Triangulo escaleno.");
  10. } else printf("Nao e possivel formar um triangulo.");
  11. }
  12.  
  13. //https://pt.stackoverflow.com/q/339064/101
Success #stdin #stdout 0s 9424KB
stdin
3
3
3
stdout
Triangulo equilatero.