Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Casino Program: Micro casino that will either flip a coin, roll dice for snake-eyes, or do a permutation of number of aces. tossCoin ,

C++ Casino Program:

Micro casino that will either flip a coin, roll dice for snake-eyes, or do a permutation of number of aces.

tossCoin , will take a positive integer and flip the coin, count the number of heads and return the number of heads.

rollDice, will take a positive number, roll two dice (values from 2 to 12) and return the number of snake-eyes (value of 2).

factorial, take a positive number and return its factorial (there are several examples of factorial).

acesHand, given that you have 7 aces in your hand, how many ways can you select X number of aces from that hand (permutations, pass the X number to the function and X has to be in range of 1 to 7).

A sample run would look like:

Micro casino

1) flip a coin

2) roll dice for snake-eyes

3) permutation of number of aces

0) quit: 2

Number of snake-eyes 7 out of 101 throws

Micro casino

1) flip a coin

2) roll dice for snake-eyes

3) permutation of number of aces

0) quit:

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

5. If yes, then why?

Answered: 1 week ago

Question

3. What changes should I be making?

Answered: 1 week ago