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

ms tyc does yoga. she worked out a total of 255.5 minutes last week.she exercised 7 days.how many minutes does she exercise each day?
calculate the new price per kilolitre that includes 15 %vat for industrial, commercial and other users​
Find the value of x. Round your answer to the nearest tenth. Will mark brainlist !
A neutral solution has what ratio of [H+] and [OH-] ions?
8=1/3(a+5) plz find A plz
A rectangular field is 1/3 as wide as it is long and is enclosed by x yards of fencing. What is the area of the field in terms of x?
rain washing away soil from a hillside
There are a few questions that I need help with.... any answers would be a great....
2 points Review the sentence below. What is the correct meaning of the word "forte?" "Literary criticism is not your forte, my dear fellow. Don't try it. You sh
What is the diameter of a 15 ft circle?