Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 174. Roll the Dice!

Created by @bmtran

Description

Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.

Example

   [x1,x2] = rollDice();
   x1 = 5;
   x2 = 2;

Tags

Problem Group

606 solvers submitted 1739 solutions (2.87 solutions/solver).

Loading Solution Map...

Problem Comments

Solution Comments