Hi can anybody explain to me how i can convert this code in ruby to vb.net cause i think this is what i need. I am trying to divide a number into as equal as possible parts.
If all parts cant be equal because the numbers cant be divided by eachother ex. 32 div by 3. The result of this should give me 11, 11 and 10 this is as equal as possible.
I found some code here that does this Split number into equal parts or what's closest to that
def split_into n, p
[n/p + 1] * (n%p) + [n/p] * (p - n%p)
end
print (split_into 32, 3) # => [11, 11, 10]
So now i have the issue that i do not understand whats happening here in ruby and so am unable to convert it.
Thanks for any help in advance.