Write a C program that simulates a guessing game. Each turn you choose among 9 possible guesses. As many as five guesses may be made a turn. For each turn the program will generate a random number between 1 and 36. Each correct guess will be rewarded with points based on how many of your current points risked.
A game board divides the numbers into rows and columns. The board provides the basis for your guesses.
You can guess whether the random is even or odd. In this case, you get 1 point for each point risked when you guess correctly. You can guess whether the number is low (1-12), medium (13-24), or high (25-36). In this case, you will get 2 points for each point risked. You can also guess left, center or right. In this case you get 2 points for each point risked when your guess is correct. Finally, you can guess a specific number between 0 adn 36. In this case you get 36 points for each point risked when your guess is correct.
To make the game more interesting each round allows up to five guesses. None of the five may be correct, or any number up to all five may be correct. The program stops when the player quits or when the player is out of points.
The program first asks the number of points the user wants to start with as shown:
How many points would you like? 2000
The program then prints the guess menu and allows up to five guesses. After all guesses have been made the program generates the random number and displays the following message:
My number is: 31
Some special rules:
The minimum amount risked on a guess is 0
The maximum is the player's current balance. You need to verify that at no time are the points risked more than the player's current balance. Any combinations of guesses are allowed on a round as long as the total does not exceed the player's balance.
Hints:
You must use at least four arrays, each of five elements. The arrays hold the guess information for the kind of guess, chosen number, amount of the guess, adn points won or lost.