Use 6 variables to capture the frequencies and a 6-way


The following expression returns a random number between 1 and 6 inclusive i.e. it simulates a die (singular of dice). 1 Math.floor((Math.random() * 6) + 1) Use this expression to simulate rolling a die 60,000 times and display the frequency with which each face of the die finishes uppermost. Use 6 variables to capture the frequencies and a 6-way nested if ... else ... control structure to increment them appropriately.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Use 6 variables to capture the frequencies and a 6-way
Reference No:- TGS02848116

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)