Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Insert(int a[], int &n)
- {
- int i,k=0;
- for (i=0; i<n; ++i)
- if (a[i]%2) ++k;;
- int j=n+k-1;
- for (i=n-1; i>=0; --i)
- {
- if (a[i]%2) a[j--]=2*a[i];
- a[j--]=a[i];
- }
- n=n+k;
- }
- Citește mai multe pe Brainly.ro - https://brainly.ro/tema/6032513#readmore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement