Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
307 B
0
Indexable
Never
#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;
    
}