0
An array of integer is given.
All elements ending in the number 4 are reduce by half
2 Respostas
+ 3
Traverse the array and use an if statement to check whether number%10 == 4, if so then do number = number/2.
+ 3
You can use linq and write just one command line
arr.ToList().Where(w => w.Value%4 == 0).ForEach(s => s.Value /= 2);