Program Declare Array Following Initial Setting 1 4 15 7 8 10 2 11 14 3 6 13 12 9 5 16 Tab Q37068339

Your program should declare an array with following initialsetting:

1 4 15 7

8 10 2 11

14 3 6 13

12 9 5 16

In this table, 16 represents a blank. Your main function shouldhave two variables named blankCol and blankRow which should keeptrack of position of blank. So for this initial setting blankRowand blankCol should both be set to 3. Your program should have afunction named “Display” which takes the array as argument and aninteger for total number of moves and should display the contentsof this 4×4 array. Your main function should have a loop takinginput for a character to represent moves. ‘d’

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.