http://codeup.kr/problem.php?id=1228
Codeup 1228 - 비만도 측정 1
xxxxxxxxxxint main(void){ double height; double weight; double stdWeight = 0; double bmi = 0; scanf("%lf %lf", &height, &weight); stdWeight = (height - 100) * 0.9; bmi = (weight - stdWeight) * 100 / stdWeight; if (bmi <= 10) { printf("정상\n"); } else if (bmi <= 20) { printf("과체중\n"); } else { printf("비만\n"); } return 0;}
'알고리즘 문제 풀기 > Codeup' 카테고리의 다른 글
| Codeup 1230 - 터널 통과하기 2 (0) | 2018.12.31 |
|---|---|
| Codeup 1229 - 비만도 측정 2 (0) | 2018.12.31 |
| Codeup 1226 - 이번 주 로또 (0) | 2018.12.30 |
| Codeup 1224 - 분수 크기 비교 (0) | 2018.12.30 |
| Codeup 1222 - 축구의 신 2 (0) | 2018.12.30 |