用c语言写一个班里45个人求低于13米的人数用for循环写
#include<stdio.h>
int main()
{
int i, count = 0;
float height[45];
printf("请输入班里每个人的身高:\n");
for(i = 0; i < 45; i++)
{
scanf("%f", &height[i]);
if(height[i] < 1.3)
{
count++;
}
}
printf("班里低于1.3米的人数为:%d\n", count);
return 0;
}
原文地址: https://www.cveoy.top/t/topic/eDwl 著作权归作者所有。请勿转载和采集!