fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void Plus5(int arr[3], int i)
  6. {
  7. while (i--) arr[i] += 5;
  8. }
  9.  
  10. int main()
  11. {
  12. int arr[3] = {1, 2, 3};
  13. Plus5(arr, 3);
  14. for (auto x : arr)
  15. cout << x << ", ";
  16. cin.get();
  17. return 0;
  18. }
Success #stdin #stdout 0s 2900KB
stdin
Standard input is empty
stdout
6, 7, 8,