Question: I need help with this C++ Data Structures Program. PLEASE FOLLOW ALL THE INSTRUCTIONS LISTED BELOW. I will rate your answer if it works! Thank
I need help with this C++ Data Structures Program. PLEASE FOLLOW ALL THE INSTRUCTIONS LISTED BELOW. I will rate your answer if it works! Thank you, in advance.
Five friends decided to play slot machine, each one has a different amount of money unknown by the others. There is only one machine, to be fair the casino manager decided to give them turns on this machine based on this sequence of minutes 1 1 2 3 5 8 13 21 (the first round 1 min , the second round 1 min the third round is 2 minutes and so on ). Note that each friend will lose 15% of his money per minute.
The purpose of this program is to print their initial amount and at which round they are out.
Friend 4 200 round 7 (13)
Friend 2 100 round 4 (3) Etc .

The data structure needed is a circular single list of friends each friend has a name (string), money (double)
The node is a friend with name and amount of Money
The main program (Lasvegas) will assign money to each between 100 and 1000.
Keep playing until all of them are out of money (or see Option 3)
Print the final report
Option1: insert the friends in the circular list randomly
Option2: use insertion sort to insert friends in the circular list
Option3: let them play 30 minutes and print the contents of the circular list
Feel free to add any functionality to this program.
Head | - 2 Head | - 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
