Lab #7-Battleship!

In this Lab the purpose of the code being written was to mimic the classic board game Battleship. The code creates a 5 by 5 grid and asks for the users input for a column and a row then checks to see if the randomly generated battleship was hit or not. If the ship was hit there will be a message printed saying “Congratulations! you sunk my battleship” otherwise “You missed my battleship!”. The code also checks to see if the input is in the 5 by 5 grid again if the input doesn’t comply it prints “Oops, that’s not even in the ocean.”

Capture