PWmk1 @ 2018-12-07 17:09:23
using namespace std; const int MAXN=10; int main() { int a[MAXN]; int b,c; c=0; for(int i=1;i<=MAXN;i++) { cin>>a[i]; } cin>>b; for(int i=1;i<=MAXN;i++) { if(b+30>=a[i]) c++; } cout<<c; return 0; }
by Montagne__ @ 2019-01-19 21:27:58
希望更丰富的展现?使用Markdown
by 夏浩然 @ 2019-03-25 20:17:22
希望更丰富的展现?使用Markdown
by 小demo @ 2019-08-23 20:32:30
using namespace std; int main(){ int a[10001]; int n,i,sum=0; for(i=1;i<=10;i++) cin>>a[i]; cin>>n; for(i=1;i<=10;i++) if(n+30>=a[i]) sum++; cout<<sum<<endl; return 0; }
by nbxh2008 @ 2019-09-24 21:03:06
using namespace std; int main() { int a[100]={0}; int b; for (int y = 0;y<10;y++) { cin>>a[y]; } cin>>b; b=b+30; int c = 0; for (int h = 0;h<=10;h++) { if(b>=a[h]) { c++; } } cout<<c-1; return 0; }