Advertisement
Josif_tepe

Untitled

Mar 17th, 2023
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int niza[3];
  9. cin >> niza[0] >> niza[1] >> niza[2];
  10. int n, x;
  11. cin >> x >> n;
  12.  
  13. for(int i = 0; i < n; i++) {
  14. sort(niza, niza + 3);
  15. niza[0] += x;
  16. }
  17. sort(niza, niza + 3);
  18. cout << niza[0] << " " << niza[1] << " "<< niza[2] << endl;
  19.  
  20.  
  21. return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement