i would like to ask on how to write a code for a 3*3 2d array, the requirement is initialized zero to whole array, and the value of the middle array should be set to 1 which is array[2][2]='1', u can choose to either move left, right, top or down for the array value '1', After every single move have been made,the array will be printed to the screen, whereverthere is a 1 in the array, display an asterisk, Wherever there is a zero, display a blank.
_ _ _
_ 1 _
_ _ _
move to right
_ _ _
_ * 1
_ _ _