Hello Need Assistance Regarding Switch Statements Shown Programming Language C Truly Appr Q37267945

Hello, I need assistance regarding switch statements shown belowin the Programming Language C ONLY.

I truly appreciate all the efforts in aiding me.

SO FAR WHAT I HAVE:

case battleshipIdx:
player->ships[battleshipIdx].length

if(s.length == 0)
{
printf(“%s’s BATTLESHIP is sunk!”,player->name);
getchar();

}

….

Now I’m not entirely sure if I’m taking the right approach tothis atm, I would appreciate some guidance.. for instance I’m notsure if I’m supposed to add the “getchar()” portion within the IFstatement or outside… and if im writing the correct code for thedecrement of the ship length

Create constants based on the order you placed the ships in the players ship ai c. i. const int battleshipldx 11. const int

Create

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.