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

Consider the circle in the diagram above. Point C is the center. DG = 14 cm 1. Name all the line segments which are radii (plural of radius). (pa
Describes the difference between a food chain and a food web
The honeymoon phase in abuse is __________. A. the reason most couples stay together B. when the couple starts fighting C. when the abuser physically attacks th
7x+9=6x-5 solve for x
What is it called when an enzyme and a substrate are temporarily linked?
What is the fraction decimal of 1/100. Good luck
Objects that reflect most wavelengths of visible light appear to be _________. A. clear B. black C. white D. colorful
glue dots are best used for
How should you test a hypothesis?
A well-written paragraph should be coherent and unified. True False