in reply to Re: Adding an new element after every 5th element in array
in thread Adding an new element after every 5th element in array

hi dave,

Thanks for the solution, but i need one more change in requirement, instead of adding the new element after "remove", i need to add the new element say after every multiples of 10th set, i.e. 10th set, 20th set,30th set and 40th set.

How it can be achieved...?

  • Comment on Re^2: Adding an new element after every 5th element in array

Replies are listed 'Best First'.
Re^3: Adding an new element after every 5th element in array
by davido (Cardinal) on Nov 26, 2013 at 20:27 UTC

    in my final example it is as easy as changing the number 3 to some other interval. Take the time to understand the solutions we provide and you will understand how to modify them to your needs.


    Dave

      Yeah Dave i got the solution, and have made changes for the count interval,when i posted the reply i didnt observe the last solution which you had made, then after that i saw it

      Thanks for the solution