Chapter 5 Exercise B(h)
Duration: 11:0 Min | May 31, 2023
Let us C solution of Chapter 5 Exercise B (h): Attempt the following program: Write a 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 customer does its picking. - Whoever is force to pick up the last matchstick loses the game