Question: // INSTRUCTIONS: p5-doWhileLoop p5-do While Loop Rolls: Count: Type your name here

// INSTRUCTIONS:

// Turn on error reporting.

error_reporting(E_ALL);

ini_set('display_errors', '1');

$year = 2021;

$rolls = "";

$count = 0;

//do/while construct

// #1 -- Write a do/while statement that generates a random number in the closed range [1, 6] and

//appends it to the string variable $rolls.

//To generate a random number in a range use the rand() function as in $roll = rand(1, 6);.

//This number simulates the rolling of a single six-sided die.

//Each roll should have a leading space, e.g. 4 1 4 6.

//Each time you roll the die update the value of $count that keeps a running total of the number of rolls.

//Keep generating rolls until you get a 6 at which time the game is over.

//TYPE CODE YOUR HERE

?>

p5-doWhileLoop

p5-do While Loop

© Type your name here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!