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

what historical event took place in 1738 A.D.
100000 less than 560313 is
Thermal effects refers to the: A.burning of fossil fuels B.use of heated water for irrigation C.removal of heat by cooling towers D.effect heat has on a body of
What is the indirect object in the sentence? Mr. Dillon did not buy Jack anything for his birthday. a. Jack b. Mr. Dillon c. birthday d. anything
complex sentences using galaxy
You order two servings of pancakes and a fruit cup. The cost of the fruit cup is $1.50 you leave a 15% tip. Your total bill is $11.50 how much does one serving
A(n) ______ is a letter or symbol that represents some unknown value
Which of these cultures was most likely influenced by the Anasazi civilization?
How do you write 570,020 in word form
Explain what makes two quantities proportional