题解 | #健康评估#
健康评估
https://www.nowcoder.com/practice/08b28e61ff6345febf09969b3a167f7e
#include <stdio.h>
#define BMI(weight, height) ((weight)/(height * height))
int main() {
float weight, height, bmi;
scanf("%f %f", &weight, &height);
bmi = BMI(weight, height);
if (18.5 <= bmi && bmi <= 23.9) {
printf("Normal\n");
}
else{
printf("Abnormal\n");
}
return 0;
}