这道题对吗??
查看原帖
这道题对吗??
750236
zzhy1112楼主2022/8/29 14:28
#include <iostream>

using namespace std;

int main () {

int apple[11];

for (int i = 1; i < 11; i++) {
    cin >> apple[i];
}
int h,ans = 0;

cin >> h;

h += 30;

for (int i = 1; i < 11; i++) {
    if (apple[i] < h + 1) {
        ans++;
    }
}

cout << ans;

return 0;

}

2022/8/29 14:28
加载中...