Question: Write a program that lets the user guess whether the flip of a coin results in heads or tails. The program randomly generates an integer
Write a program that lets the user guess whether the flip of a coin results in heads or tails. The program randomly generates an integer 0 or 1, which represents head or tail. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.
Step by Step Solution
3.57 Rating (154 Votes )
There are 3 Steps involved in it
Output Enter a guess 0 Your guess is correct To randomly generate 0 ... View full answer
Get step-by-step solutions from verified subject matter experts
