Create a 5 x 5 array as shown below. Then, write the following subprograms:
printArray (prints out the array)
flipHorizontal (flips the contents horizontally, then calls printArray)
flipVertical (flips the contents vertically, then calls printArray)
Then, have the subprograms run sequentially in a main program for grading.
Note: you should not modify the array in place; you should instead create a new array each time it's flipped.
Sample Run
The array:
0 2 0 0 0
0 2 0 0 0
0 2 2 0 0
0 2 0 2 0
0 2 0 0 2
Flipped horizontally:
0 0 0 2 0
0 0 0 2 0
0 0 2 2 0
0 2 0 2 0
2 0 0 2 0
Flipped vertically:
0 2 0 0 2
0 2 0 2 0
0 2 2 0 0
0 2 0 0 0
0 2 0 0 0