#include <stdio.h>

int main() {
    int height, count = 0;
    for (int i = 1; i <= 45; i++) {
        printf("请输入第%d位同学的身高(单位:厘米):", i);
        scanf("%d", &height);
        if (height < 130) {
            count++;
        }
    }
    printf("低于1.3米的人数为%d人\n", count);
    return 0;
}
用c语言写一个班里45个人输入身高求低于13米的人数不用数组用for循环写

原文地址: https://www.cveoy.top/t/topic/eDwx 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录