2d array codes

 

Code: