Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
420 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
    int mas[100], y,x;
 
    for (int i = 0; i < 100; i++) {
        cin >> mas[i];
    }
    
    cout << " vvedite ogranichenie: ";
    cin >> y>>x;
    for (int i = 0; i < 100; i++) {
        if (mas[i] > y) {
            mas[i] = y;
        }
        if (mas[i] < x) {
            mas[i] = x;
        }
        cout << mas[i] << " ";
    }
}
Leave a Comment