Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int niza[3];
- cin >> niza[0] >> niza[1] >> niza[2];
- int n, x;
- cin >> x >> n;
- for(int i = 0; i < n; i++) {
- sort(niza, niza + 3);
- niza[0] += x;
- }
- sort(niza, niza + 3);
- cout << niza[0] << " " << niza[1] << " "<< niza[2] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement