Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help with part C please? This need to be in C++. I already have part A and B Play Summary: You wagered 50

Can you help with part C please? This need to be in C++. I already have part A and B

image text in transcribedimage text in transcribed
Play Summary: You wagered 50 coins and won 100 coins. You wagered 150 coins and won 300 coins. You wagered 200 coins and won 400 coins. You wagered 400 coins and won 0 coins. You wagered 100 coins and won 0 coins. Your minimum wager was 50 coins. Your maximum wager was 400 coins. Your minimum prize was 0 coins. Your maximum prize was 400 coins. Example 2: Input a seed: no Input a seed: 3 You currently possess 100 coins. Bet how many coins? 50 243 You did not win. You currently possess 50 coins. Bet how many coins? 80 Bet how many coins? -20 Bet how many coins? all Bet how many coins? 40 4 5 5 You won 80 coins! You currently possess 90 coins. Bet how many coins? 0 Play Summary: You wagered 50 coins and won 0 coins. You wagered 40 coins and won 80 coins. Your minimum wager was 40 coins. Your maximum wager was 50 coins. Your minimum prize was 0 coins. Your maximum prize was 80 coins. Example 3: Input a seed: 42 You currently possess 100 coins. Bet how many coins? 0In this part, you will store the wager and winnings history of each turn and output a summary at the end. Use two vectors, one to store each wager, and the other to store each prize winnings. After the game has ended, either by the user providing an input of O or running out of coins, loop through the vectors and output the wager and winnings for each turn of play. Then, output the smallest and largest wagers, and the smallest and largest winnings. If the user enters O on the rst turn and does not play, you should not display this summary

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions