I have an int array called oddNumbers: int [] oddNumbers = {1,3,5,7,9}
I want to process oddNumbers in the following way;
For each element of oddNumbers (except the last element at index 4 i.e 9 ) to copy into that element
the value from the element to its immediate right.
This means that the value in index 1 (i.e 3) is copied into index 0, the value in index 2 is
copied into index 1 and so on, until the element at index 4 is copied into index 3.
The contents of the rightmost index 4 (i.e 9) will remain unaffected.
After processing the array oddNumbers, it should have this appearance: int [] oddNumbers = {3,5,7,9,9}
I would be grateful for some help in coding to achieve this.
Best wishes
av8.