Advertisement
Mihai_Preda

Untitled

Jan 16th, 2021
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. // Sa inlocuim elementele pare cu jumatatea lor
  2. void f(int v[], int n)
  3. {
  4.     if(n == 0)
  5.         return;
  6.     if(v[n] % 2 == 0)
  7.         v[n] = v[n] / 2;
  8.     f(v, n-1);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement