I have been searching online for a program that will:
-reads in number of times a user wants a coin flipped
-flip the coin that many times, printing out result of each coin flip
-print out the total number of heads flipped and total number of tails flipped

the application should contain the class method called flipCoin( )

Can anyone help out?

Recommended Answers

All 2 Replies

Member Avatar
public class Finger {
	public static void flip(String finger) {
		// your code here
	public static void main(String[] args) {

Wait, that's not quite right....

Excuse ztini's rudeness, but I think what s/he meant to say was that we aren't going to solve a problem for you u need to show effort and then we can help you out. However, if you are at a loss as to where to turn, you might want to look in the Java API under the Random class or at the random() method in the Math class. Good luck!

Be a part of the DaniWeb community

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