21 Matchstick Game: C Program
Satish B
http://technotip.com/7264/21-matchstick-game-c-program/
Write a C program for a matchstick game being played between the computer and a user. Your program should ensure that the computer always wins. Rules for the game are as follows:
- There are 21 matchsticks.
- The computer asks the player to pick 1, 2, 3 or 4 matchsticks.
- After the person picks, the computer does its picking.
- Whoever is forced to pick up the last matchstick loses the game.
Note: break; breaks out of the loop or terminates the execution of the loop.
continue; skips execution of all the code after it in the loop and goes for the next iteration of the loop.
C Programming Interview / Viva Q&A List http://technotip.com/6378/c-programming-interview-viva-qa-list/
C Programming: Beginner To Advance To Expert http://technotip.com/6086/c-programming-beginner-to-advance-to-expert/ ... https://www.youtube.com/watch?v=VO_5XTLxKmc
2020-07-21
0.0 LBC
Copyrighted (contact publisher)
10050841 Bytes