Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I needed some help. I am in a beginning c plus plus class. These problems relate to Functions and have talked about (void) using visual

image text in transcribed

I needed some help. I am in a beginning c plus plus class. These problems relate to Functions and have talked about (void) using visual studios with #include ,include, please show steps thank you.

Write a program that simulates 10 flips of a coin. Every time heads comes up, the player wins S2; every time tails comes up, the player loses S1. Write a function CalculateTotal that adds up the player's winnings after 10 flips of the coin. 2A Write a program that helps an elementary school student learn addition. Use rand to produce two positive one-digit integers. It should then type a question such as "what is 6 plus 7?. The student then types the answer. Your program checks the student's answer. If it is correct, print "Very good!", then ask another addition question. If the answer is wrong, print "No. Please try again.". then let the student try the same question repeatedly until the student finally gets it right. a. Write a program that simulates rolling a pair of dice 10 times. Every time the sum is even the player wins $10; every time the sum is odd, the player loses $10. At the end, the program tells the player whether he won or lost and by how much. aC

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

More Books

Students also viewed these Databases questions