题解 | #健康评估#

健康评估

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;
}
全部评论

相关推荐

hso_:哈哈哈哈哈哈我没offer一样在同一道题开喷了
投递深圳同为数码等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务