In this run, the player wins.
linux1[102] a.out
A greeting would go here.
The instructions to the player would go here.
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 40 tries remaining.
Row number:
Please enter an integer between 0 and 9 :-1
Please enter an integer between 0 and 9 :10
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 39 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 38 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | | | | | | X | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 37 tries remaining.
Row number:
Please enter an integer between 0 and 9 :6
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | | X | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 36 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | | X | X | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 35 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :9
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 34 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :6
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You sunk my Battleship !
You have 33 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | X | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 32 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | O | X | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 31 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 30 tries remaining.
Row number:
Please enter an integer between 0 and 9 :5
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | | | | | | | | |
-----------------------------------------
5 | | O | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 29 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :2
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | X | | | | | | | |
-----------------------------------------
5 | | O | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 28 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You sunk my Destroyer !
You have 27 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :2
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 26 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :4
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | O | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 25 tries remaining.
Row number:
Please enter an integer between 0 and 9 :5
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | O | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 24 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | O | | | | | |
-----------------------------------------
2 | | | | | | | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 23 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | O | | | | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 22 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | O | | | O | X | | | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 21 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | | | | | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 20 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You sunk my Aircraft Carrier !
You have 19 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 18 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :7
You've already tried that position. Try again.
You have 18 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 17 tries remaining.
Row number:
Please enter an integer between 0 and 9 :8
Column number:
Please enter an integer between 0 and 9 :4
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | O | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 16 tries remaining.
Row number:
Please enter an integer between 0 and 9 :8
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | | | | O | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 15 tries remaining.
Row number:
Please enter an integer between 0 and 9 :8
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 14 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | | | | | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 13 tries remaining.
Row number:
Please enter an integer between 0 and 9 :6
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 12 tries remaining.
Row number:
Please enter an integer between 0 and 9 :9
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | | |
-----------------------------------------
You sunk my Submarine !
You have 11 tries remaining.
Row number:
Please enter an integer between 0 and 9 :9
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You have 10 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | O | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You have 9 tries remaining.
Row number:
Please enter an integer between 0 and 9 :6
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | O | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | O | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You have 8 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | O | | X | | | | |
-----------------------------------------
1 | | O | | | O | X | | O | X | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | O | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You have 7 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | O | | X | | | O | |
-----------------------------------------
1 | | O | | | O | X | | O | X | |
-----------------------------------------
2 | | | | | | X | | O | | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | O | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You have 6 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | O | | X | | | O | |
-----------------------------------------
1 | | O | | | O | X | | O | X | |
-----------------------------------------
2 | | | | | | X | | O | O | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | O | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You have 5 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :9
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | O | | X | | | O | |
-----------------------------------------
1 | | O | | | O | X | | O | X | X |
-----------------------------------------
2 | | | | | | X | | O | O | |
-----------------------------------------
3 | | O | | | | X | | | | |
-----------------------------------------
4 | O | X | X | X | | X | | | O | |
-----------------------------------------
5 | | O | | | | O | | | | |
-----------------------------------------
6 | O | | | O | | | | O | | |
-----------------------------------------
7 | X | | O | | | | X | X | X | X |
-----------------------------------------
8 | X | O | | | O | | | | | |
-----------------------------------------
9 | X | | | | | | | | O | |
-----------------------------------------
You sunk my Cruiser !
YOU WON !!!
In this run, the player loses, so you must display
the contents of the array so that he can see the
remaining ships or still floating pieces of ships.
linux1[103] a.out
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 40 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 39 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :2
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | | | | | | | |
-----------------------------------------
4 | | | | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 38 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | | | |
-----------------------------------------
4 | | | | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 37 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :2
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | | | |
-----------------------------------------
4 | | | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 36 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You sunk my Destroyer !
You have 35 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 34 tries remaining.
Row number:
Please enter an integer between 0 and 9 :8
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 33 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | | |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 32 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | | |
-----------------------------------------
1 | | | | | | | | | X | |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 31 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 30 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :9
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You sunk my Cruiser !
You have 29 tries remaining.
Row number:
Please enter an integer between 0 and 9 :5
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | | | | O | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 28 tries remaining.
Row number:
Please enter an integer between 0 and 9 :5
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 27 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :2
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 26 tries remaining.
Row number:
Please enter an integer between 0 and 9 :6
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 25 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :4
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 24 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :6
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 23 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 22 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :6
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 21 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 20 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 19 tries remaining.
Row number:
Please enter an integer between 0 and 9 :7
Column number:
Please enter an integer between 0 and 9 :9
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You sunk my Battleship !
You have 18 tries remaining.
Row number:
Please enter an integer between 0 and 9 :8
Column number:
Please enter an integer between 0 and 9 :3
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | | | |
-----------------------------------------
You have 17 tries remaining.
Row number:
Please enter an integer between 0 and 9 :9
Column number:
Please enter an integer between 0 and 9 :7
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 16 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 15 tries remaining.
Row number:
Please enter an integer between 0 and 9 :6
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 14 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :0
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 13 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :9
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | O |
-----------------------------------------
4 | | X | X | X | | | | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 12 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :6
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | O |
-----------------------------------------
4 | | X | X | X | | | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 11 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | | X | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | O |
-----------------------------------------
4 | | X | X | X | | | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 10 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :4
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | O |
-----------------------------------------
4 | | X | X | X | | | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 9 tries remaining.
Row number:
Please enter an integer between 0 and 9 :0
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | O |
-----------------------------------------
4 | | X | X | X | | | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 8 tries remaining.
Row number:
Please enter an integer between 0 and 9 :2
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | | | O | | O |
-----------------------------------------
4 | | X | X | X | | | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 7 tries remaining.
Row number:
Please enter an integer between 0 and 9 :3
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 6 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :5
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You sunk my Aircraft Carrier !
You have 5 tries remaining.
Row number:
Please enter an integer between 0 and 9 :4
Column number:
Please enter an integer between 0 and 9 :8
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | O | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | | | | | | O | | |
-----------------------------------------
You have 4 tries remaining.
Row number:
Please enter an integer between 0 and 9 :9
Column number:
Please enter an integer between 0 and 9 :2
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | O | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | O | | | | | O | | |
-----------------------------------------
You have 3 tries remaining.
Row number:
Please enter an integer between 0 and 9 :9
Column number:
Please enter an integer between 0 and 9 :4
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | O | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | O | | O | | | O | | |
-----------------------------------------
You have 2 tries remaining.
Row number:
Please enter an integer between 0 and 9 :1
Column number:
Please enter an integer between 0 and 9 :1
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | O | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | O | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | O | | O | | | O | | |
-----------------------------------------
You have 1 tries remaining.
Row number:
Please enter an integer between 0 and 9 :9
Column number:
Please enter an integer between 0 and 9 :9
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | O | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | O | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | | | O | | | | X | X | X | X |
-----------------------------------------
8 | | | | O | | O | | | | |
-----------------------------------------
9 | | | O | | O | | | O | | O |
-----------------------------------------
You Lose :-(
See where they were ...
0 1 2 3 4 5 6 7 8 9
-----------------------------------------
0 | O | | O | | | X | O | | O | |
-----------------------------------------
1 | | O | | O | O | X | | | X | X |
-----------------------------------------
2 | | O | | | O | X | | | | |
-----------------------------------------
3 | O | | | O | | X | | O | | O |
-----------------------------------------
4 | | X | X | X | | X | O | | O | |
-----------------------------------------
5 | | | | | | O | | | O | |
-----------------------------------------
6 | O | | | O | | | | | | |
-----------------------------------------
7 | S | | O | | | | X | X | X | X |
-----------------------------------------
8 | S | | | O | | O | | | | |
-----------------------------------------
9 | S | | O | | O | | | O | | O |
-----------------------------------------
linux1[104]