Murex interview question

Deciphering program Battleship program 1 other I forget