Question: i have qustion, how i can move element in 2D char array for example main char is C( just C will be moved each time)
i have qustion, how i can move element in 2D char array for example main char is "C"( just C will be moved each time) i want to move C top or down, left or right, in each time i press 2 for down, 6 right, 8 top , 4 left, when C moved should swapped with the char in the moved position
[ A , B , C ]
[ D , E , F ]
[ G , H , I ]
after move C down, the output:
[ A , B , F]
[ D , E , C]
[ G , H , I ]
And so on..
thank you,,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
