I have an array with 2 dimensions and when I print the data of the array the first time, the date is printed correctly, but the other times the data of array[last][i] from i = 0
An array of length numero has numero elements. Going from index 0 to numero-1. You are treating them like they have an index numero. Switch out i <= numero for i < numero. Do the same for all for loops and with j.