Question: Java program 4. You are in the Olympic stadium in Beijing and are playing a game with your friend: you all take turns to toss
4. You are in the Olympic stadium in Beijing and are playing a game with your friend: you all take turns to toss a coin; head means "go up two steps", tails means "go down one step". You start in the middle of the stairs (step 50 out of 100); the winner is the person who gets to the top first. If you get to the bottom you are out. You can quit whenever you want. This program keeps track of your position, asks if you still want to play, tells you i you reach at the top or at the bottom and tosses the coin for you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
