BASIC의 개발 노트
1212 : 삼각형의 성립 조건 본문
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #include <stdio.h> int main() { int a, b, c; int tmp = 0; scanf("%d %d %d", &a, &b, &c); if (a > b && a > c){ tmp = a; a = c; c = tmp; }else if (b > a && b > c){ tmp = b; b = c; c = tmp; } if (a + b > c){ printf("yes"); }else{ printf("no"); } return 0; } | cs |
'Algorithm > CodeUp' 카테고리의 다른 글
| 1228 : 비만도 측정 1 (0) | 2020.04.08 |
|---|---|
| 1226 : 이번 주 로또 (0) | 2020.04.08 |
| 1210 : 칼로리 계산하기 (0) | 2019.04.28 |
| 1207 : 윷놀이 (0) | 2019.04.28 |
| 1206 : 배수 (0) | 2019.04.28 |
Comments