Question: Help with this program in c++ language Exercise #2: The first am that will have three functions (printstars, addThem and main): Write a progr function

Help with this program in c++ language  Help with this program in c++ language Exercise #2: The first

Exercise #2: The first am that will have three functions (printstars, addThem and main): Write a progr function should be named printstars and will output five stars on a single line. The second function should be named addThem and will accept two numbers (passed as parameters) and return the sum. Finally, the main function will: 1) ask the user to input two numbers 2) call the addThem function that will return the sum, and then 3) execute a loop that will call the printStars function the number of times returned by the addThem function. Exercise #: Create a coin-flipping game. Ask the user how many times to flip the coin, and use the random function to determine heads or tails each time a coin is flipped. Assume the user starts with $50. Every time the coin is flipped calculate the total (heads +$10, tails-$10). Create another function to test if the user has gone broke yet (THIS FUNCTION MUST RETURN A BOOLEAN TRUE/FALSE VALUE). End the program when the user is broke on when the coin was flipped the number of times the user had specified Display: 1) how many times the coin was flipped 2) the number of times "heads" was the result, 3) the number of times "tails" was the result, and 4) how much money the user has at the end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!