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

can somebody help me pleaseee ?? it’s due soon & im stuck .
Pasta, bread, fruits, and vegetables are examples of which nutrient category? O proteins O fats O vitamins O carbohydrates
Harry S. Truman is considered to be the Father of Containment. Is it true or false
please help me write a race paragraph
According to Boyle's Law, if the temperature of a confined gas is held fixed, then the product of the pressure P and the volume V is a constant, suppose that, f
PLEASE HELP ME IM RUNNING OUT OF TIME
What is the slope of the line whose equation is y-4=(x-2)? 6 S 3 2 1 -5-5-32 + 23 5 x 2719 2
why are those who take bribery or give bribery considered enemies of the nation?​
what are the steps for the respiratory system?
Why do you think technology for navigation is important on your journey?