fork download
  1. /* Program untuk Menentukan Jenis Segitiga */
  2. #include <stdio.h>
  3. int main()
  4. {
  5. int a, b, c;
  6. scanf("%d %d %d", &a, &b, &c);
  7.  
  8. if ((a >= b + c) || (b >= a + c) || (c >= a + b))
  9. printf("Bukan Segitiga");
  10. else
  11. if ((a == b) && (b == c))
  12. printf("Segitiga Sama Sisi");
  13. else if ((a ==b) || (b == c) || (a == c))
  14. printf("segitiga Sama Kaki");
  15. else
  16. printf("segitiga sembarangan");
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
Bukan Segitiga