Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
435 B
0
Indexable
Never
#include <iostream>

using namespace std;

int main()
{
    int up, down;
    int arr[100];
    for (int i = 0; i < 100; i++) {
        cin >> arr[i];
    }
    cin >> up >> down;
    for (int i = 0; i < 100; i++) {
        if (arr[i] > up)arr[i] = up;
        else if (arr[i] < down) arr[i] = down;
    }
    cout << endl;

    for (int i = 100; i < 100; i++) {
        cout << arr[i] << endl;
    }
    
}


Leave a Comment