Rangerlopez8785 Rangerlopez8785
  • 18-10-2017
  • Computers and Technology
contestada

Write a program that will print out statistics for coin tosses. the user will input either an "h" for heads or a "t"

Respuesta :

anthonylendooxy1s2
anthonylendooxy1s2 anthonylendooxy1s2
  • 18-10-2017
01f or(int i=0;i<TOTAL_TOSS;i++)

02 {

03   System.out.print("Toss number "+i+". Please enter h for heads, and t for tails: ");

04   toss=scan.nextInt();

05   if(toss==1)

06   {

07       HeadCount++;

08   }

09   else

10   {

11      TailsCount++;

12   }

13}


you can work with that
Answer Link

Otras preguntas

How does Mrs Hale alter the quilt in Trifles?.
mga pangunahing tauhan sa krusada​
i) What happens to bulb X? ii) What happens to bulb Y? Refer Picture Below
Research Essay Prompt: How did the Human Genome Project revolutionize our understanding of DNA? Summarize the talking points Saey and Green detailing their work
Help the perimeter is about _ units_
f divided by -7 = -8
What was the president's reason for Executive Order 9066?.
Which sentence most clearly contains an allusion? OA. My friend managed to finish all his homework during lunch hour like somne kind of Merlin. B. Trying to pre
What are types of scarcity?.
Compare and contrast the two types of people Gray describes in Elegy in a Country Churchyard. Full credit answers will include description of the two types of p