Using C#, create a program called CoinFlip which will contain the following methods
1)FlipCoin() – which will return either “heads” or “tails” randomly as a coin flip result
2)ComputePercentRight() – which will take in a number of flips guessed right and the total number of flips and return the percentage of correct guesses
3)WasRight() – which will take in the guess and flip and determine if the user was right or not and return the result

Ask the user to pick heads or tails. After he picks, flip a coin and report the results to the screen, keeping track of how many flips you have done and how many the user has gotten right. After 10 flips, report to the user their percentage right in guessing. This is also a console application

Recommended Answers

All 2 Replies

The Daniweb community is not a place to come and just ask for someone to write code for you, it's here to help not do your school work.

How about instead, putting some effort into the project yourself, trying to get it to work, and then if you have issues you can come back and ask for some help.

But once again, this isn't a place to just ask someone to do your school work

Hera's a page that'll help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.