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
OR
OR