Objective
In minesweeper, each square without a mine shows how many mines there are in its up to 8 neighbouring squares. You must take care of the edges of the board.
Instructions
- The first line has rows
fand columnsc; then comeflines ofccharacters, with*(mine) or.(empty). - Show the solved board: mines stay as
*and each empty square is replaced by its number of neighbouring mines.
3 3
*..
...
..*
*10
121
01*
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise