wuzixianhaoyoucha @ 2022-11-18 21:42:48
#include <iostream>
using namespace std;
int main() {
int a[10] ;
int b, k, count = 0 ;
cout << "输入100到200之间十个整数" << endl;
for (int i = 0; i < 10; i++) {
cin >> a[i] ;
}
cout << "输入100到120之间的整数" << endl;
cin >> k ;
b = k + 30 ;
for (int j = 0; j < 10; j++) {
if (a[j] <= b)
count++;
}
cout << count << endl;
return 0;
}
by End_of_time @ 2022-11-18 21:46:00
额,请注意,在各种OJ上提交时,不要带有类似于“输入100到200之间十个整数”这种东西,去掉
cout << "输入100到200之间十个整数" << endl;
cout << "输入100到120之间的整数" << endl;
这两句就可以AC了
by zh1221_qwq @ 2022-11-18 21:46:20
“ cout << "输入100到200之间十个整数" << endl;”“ cout << "输入100到120之间的整数" << endl;”删了就行了
by End_of_time @ 2022-11-18 21:46:30
@wuzixianhaoyoucha
by wuzixianhaoyoucha @ 2022-11-18 21:47:35
@EGPlayer !好的好的