Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void prelucrare(int& n)
- {
- int n1 = n, n2 = 0, c, pow = 1;
- while (n1 != 0)
- {
- c = n1 % 10;
- if (c % 2 == 1)
- {
- c--;
- }
- n2 += pow * c;
- pow *= 10;
- n1 /= 10;
- }
- n = n2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement