By Prachi Jain
In this project, I will implement a simple number guessing game, casino in the C++ programming language. The player can wish to play the game as long as he/she has money left with them.
In this project, I have implemented the number guessing game which is a casino in the C++ programming language.
The player will be required to enter their name and initial amount. After that, the player will bet a certain amount and choose a number between 0-10. If the chosen number is equal to the number dice_number generated by the rand() function in C++ then the player wins 10 times the amount bet by the player. The player can continue to play as long as they have money left with them.
The functions used in the program are:
void rules()// to state the rules to the player int main()//to execute the program
rand()-Returns a random integral number in the range between 0 and RAND_MAX.
We will then extract the right extreme digit by doing modulo by 10 of the number generated by the rand() function and that will work as our dice_number in the program.
Submitted by Prachi Jain (jainprachi954)
Download packets of source code on Coders Packet