Write an if statement that uses a pseudorandom number to


Problem

Write an if statement that uses a pseudorandom number to assign "heads" or "tails" to a variable coin_flip. The probability of each should be 0.5. Assume the declaration Random my_random;. 10. Write a statement that uses a pseudorandom number to assign a value of 1 through 6 to a variable die, where each number is equally likely. Assume the declaration Random my_random.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write an if statement that uses a pseudorandom number to
Reference No:- TGS02653005

Expected delivery within 24 Hours