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

Ecosystem encompassing all the life on earth in the physical environment that supports it
What political concern dominated the period of congressional reconstruction?
Use mental math to find the sum show your strategy 122+306
the institution through which a society makes and enforces rules is called
In your opinion, what would have happened had the Founding Fathers chosen to simply modify the Articles of Confederation?
Discuss the origin and history of critical rationalism
What is a system of knowledge and the methods used to find that knowledge
What effects did the black codes and the Nadir have on freed people?
How did the National Urban League help African Americans? a. by helping newcomers to large cities find homes and jobs b. by providing legal support to defend th
Larutan kcl dengan konsentrasi 0,5 m dapat dibuat dengan melarutkan serbuk kcl ke dalam 100 ml air. jika diketahui Mr KCL 74,5 massa kcl yang harus dilarutkan a