讨论 / 这道题目就是用来给我了解这个OJ的C语言编译器的
康斌 2014-10-14 23:37:45
点我顶贴 收藏 删除
#include <stdio.h>

#define APPLE_NUM 10

int main()

{

int apple[APPLE_NUM];

int height;

int can_get_apple_num = 0;

int i;

for(i = 0; i < APPLE_NUM; i++)

scanf("%d", &apple[i]);

scanf("%d", &height);

height += 30;

for(i = 0; i < APPLE_NUM; i++)

{

if(height >= apple[i])

can_get_apple_num++;

}

printf("%d", can_get_apple_num);

return 0;

}

查看更多回复
提交回复