Problem in input

its not taking all the elements of 2d array . Only last row elements are printing

please share code link on coding blocks ide