Question: Help, i need to make this in C, trying to do it and it wont run, im using codeblocks COP3223 Assignment1,Battleship Protected View Saved to


Help, i need to make this in C, trying to do it and it wont run, im using codeblocks
COP3223 Assignment1,Battleship Protected View Saved to this PC n Layout References Mailings Review View Help Tell me what you want to do from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View Enable Editing battleship.c 1. Create a new C source code file names battlesh 1. Write the preprocessor command to include the s header file from the C library Write the function declaration or prototype for function welcomeScreen (hint it is the same method signature of the function with a semi-colon at the end) Write the main function so it does the following 2. 3. Return type int a. b. Empty parameter list c. Calls function welcomeScreen d. Returns 0 to indicate succes sful operation of the program 4. Write the function welcomeScreen so it does the following Return type void Empty parameter list Outputs to the screen the name of the game and the instructions as shown in Figure 1 Welcome screen function output a. b. c. Battleship executable Test Case 1 Test Case 1 passes Source compiles with no errorsR Source runs with no errOrs Source includes comments Perform the following test cases Test Cases Expected outcome When the executable runs, the output in the command prompt should look like Figure 1 Welcome screen function output Action Run executable Test Case 1 COP 3223 Assignment 1 Battleship Protected View - Saved to this PC Layout References Mailings Review View Help Tell me what you want to do from the Internet can contain viruses. U nless you need to edit, it's safer to stay in Protected Vievw . Enable Editing BB888 AAAA TTTTTT TTTTTT LL sS SS HH HH11 BB88 AA AA TT TTLLLLLL EEEEEE SSSSS HH HH II Pp RULES OF THE GAME 1. This is a two player game. Player 1 is you and Player 2 is the computer. . Player 1 will be prompted if user wants to manually input coordinates for the game board or have the computer randomly generate a game board 4. There are five types of ships to be placed by longest length to the shortest; [c] Carrier has 5 cells, [b] Battleship has 4 cells, [rl Cruiser has 3 cells, [s] Submarine has 3 cells, [d] Destroyer has 2 cells . The computer randomly selects which player goes first 6. The game begins as each player tries to guess the location of the ships of the opposing player's game board; [X] hit and [~ miss . First player to guess the location of all ships wins Process returned e (exe) execution time Press any key to continue. 3.679 s
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
