Question: C++ LANGUAGE!!!! Create a program that simulates a slot machine. When the program runs it should do the following: 1. Asks the user to enter
C++ LANGUAGE!!!!
Create a program that simulates a slot machine. When the program runs it should do the following: 1. Asks the user to enter the amount of money he wants to enter into the slot machine. 2. Instead of displaying images, have the program display the name of the image. The program must randomly select a word from the following list: Cherries, Oranges, Plums, Bells, Melons, Bars
To select a word, the program can generate a random number in the range of 0 to 5. If the number is 0, the selected word is Cherries, if the number is 1, then the selected word is Oranges, and so forth. The program should randomly select a word from the list 3 times and display all 3 of the words.
3. If none of the randomly selected words match, the program informs the user that he or she has won $0. If 2 of the words match, the program informs the user of the amount (2 times the amount entered) that he or she has won. If 3 of the words match, the program informs the user of the amount (3 times the amount entered) that he or she has won.
The program Runs Repeatedly until the user says NO.
You can define a function to generate the word in the list, another function to compare the three slots and display proper message. Then call those functions in the main function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
