Write a program that simulates flipping a coin


Problem:

Question- Write a program that simulates flipping a coin 100,000 times and reports the longest consecutive sequence of heads. Use (int) ( Math.random() + .5) to generate a random integer, 0 for heads and 1 for tails.

Do not use arrays. Please try and use a while loop also dont use cryptic variable names. So like say heads or tails and not just a, b , c or i.

Write the code step by step and explain it.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that simulates flipping a coin
Reference No:- TGS0893361

Expected delivery within 24 Hours