fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a, b, c;
  5. scanf("%d %d %d", &a, &b, &c);
  6.  
  7. if((a >= b+c)||(b >= a+c)||(c >= a+b))
  8. printf("Bukan Segitiga");
  9. else
  10. if ((a == b) && (b == c))
  11. printf("Segitiga Sama Sisi");
  12. else if ((a == b) ||(b == c) || (a ==c))
  13. printf("Segitiga Sama Kaki");
  14. else
  15. printf("Segitiga Sembarang") ;
  16. return 0;
  17. }
  18.  
  19.  
Success #stdin #stdout 0s 5272KB
stdin
1000 1000 500
stdout
Segitiga Sama Kaki