题解 | #衡量人体胖瘦程度#
衡量人体胖瘦程度
https://www.nowcoder.com/practice/4d604603fae94a26b59b7bc18f363bc0
#include <stdio.h> int main() { int a, b; while (scanf("%d %d", &a, &b) != EOF) { double c=a/(b*b/10000.0); if(c<18.5) { printf("Underweight"); } else if(c>=18.5&&c<=23.9) { printf("Normal"); } else if(c>23.9&&c<=27.9) { printf("Overweight"); } else{ printf("Obese"); } printf("\n"); } return 0; }