fork download
  1. #include <stdio.h>
  2.  
  3.  
  4. int isTriangle(int a, int b, int c) {
  5. if ((a + b)>c ||(a + c) >b ||(b+c)> a) {
  6. return 1;
  7. } else {
  8. return 0;
  9. }
  10. }
  11.  
  12. int main() {
  13. if (isTriangle(12, 20, 7)) {
  14. printf("삼각형이 됩니다.");
  15. } else {
  16. printf("삼각형이 안 됩니다.");
  17. }
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
삼각형이 됩니다.