Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

How would I set up my displayMenu function to save user input into variable select then return to the main function so it can clear

How would I set up my displayMenu function to save user input into variable select then return to the main function so it can clear the screen and open the next function?
image text in transcribed
image text in transcribed
.c- Code::Blocks 17.12 iew Search Project Build Debug Fortran wxS * * X battleship.cX int displayMenu () 7/un int select: //variable declarar printf ("Select the option for t printf (" I1] Manually ") printf ("[21 Randomly n"): printf ("Enter Option: T scanf ("%d" , &select); Iyyisavin return select void displayGameBoard () int main () short player-0: //Variables for players short shot -0: int menuSelect 0: int north = 0; tmanables: for direction int south = 0; int east = 0; int west 0; int i 0: //Variables for counters int counter = 0; char shipSymbol -0: //Vaziabie as temporary s welcomeScreen O: 7/goll for welcone sereen system ("cls") / Giears weIcome sereen menuselect = display Menu(); ma system ("s): /qaeete men 0: 7/va rrablel menusedect return 0; hers search results -Build log Code:Blocks xLAcccc Cccc X0Build log chrests X-Build mess X1. Build mess LineHessage Build file: "no target" in "no, project" (compile sers Baile SersBaile. . , varnunctionpliaan 'declara tten 63 varning2. implic t d clara ta of

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions