posted 2 years ago
Ok, so the idea is to find an specific numer in a given array, change it to a zero and change the index so it is the last element in the array.
All the other elements should then move so their index = index 1
So this is what I've got so far:
This changes the numbers for instance 3 into 0 and puts them in the back of the array but the output is wrong
Output:
4, 8, 2, 5, 5, 17, 7, 99, 0, 0
I can't seem to find the problem though. Can anybody help or give a hint where I am going wrong here?
Thanks in advance.
All the other elements should then move so their index = index 1
So this is what I've got so far:
This changes the numbers for instance 3 into 0 and puts them in the back of the array but the output is wrong
Output:
4, 8, 2, 5, 5, 17, 7, 99, 0, 0
I can't seem to find the problem though. Can anybody help or give a hint where I am going wrong here?
Thanks in advance.
Kenneth Van Gysegem
Ranch Hand
Posts: 43
Kenneth Van Gysegem
Ranch Hand
Posts: 43
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
The WEB SERVICES and JAXRS Course
https://coderanch.com/t/690789/WEBSERVICESJAXRS
