Aj1eawa_ @ 2024-04-15 17:08:08
#include <iostream>
using namespace std;
int main()
{
int apple[100]={};
int high;
int number=0;
cin>>high;
for(int c=0;c<10;c++)
{
cin>>apple[c];
}
for(int d=0;d<10;d++)
{
if(apple[d]<=high+30)
{
number++;
}
}
cout<<number<<endl;
return 0;
}
输入;100 200 150 140 129 134 167 198 200 111 110 输出;5
by Kazeno_Akina @ 2024-04-15 17:47:09
@Aj1eawa_ 你输入顺序反了
先输入苹果高度后输入高度
by Aj1eawa_ @ 2024-04-15 19:05:26
@DoraYaoxy ok,感谢