Untitled
unknown
plain_text
3 years ago
307 B
6
Indexable
#include <iostream>
using namespace std;
int main() {
int a, b, c, d;
cin >> c;
int mas[100];
for (int i = 0; i < c; i++){
cin >> mas[i];
}
cin >> b;
d = 0;
for (int i = 0; i < c; i++){
if (mas[i] <= b) d += mas[i];
}
cout << d;
}Editor is loading...