萧道成 @ 2018-07-18 11:37:05
using namespace std;
int main()
{
int s1,s2,s3,s4,s5,s6,s7,s8,s9,s10;//十个苹果
int b,c=0,d;
cin>>s1>>s2>>s3>>s4>>s5>>s6>>s7>>s8>>s9>>s10;//输入苹果高度
cin>>b;//输入身高
d=b+30;//身高加板凳
if (s1<=d)
c++;
if (s2<=d)
c++;
if (s3<=d)
c++;
if (s4<=d)
c++;
if (s5<=d)
c++;
if (s6<=d)
c++;
if (s7<=d)
c++;
if (s8<=d)
c++;
if (s9<=d)
c++;
if (s10<=d)
c++;//每有一个苹果的高度小于身高加上板凳,那么c便+1
cout<<c;
return 0;
}
by Cynthia_Huang @ 2019-07-14 14:02:48
对对对