Roll the Dice! - MATLAB Cody - MATLAB Central

Problem 174. Roll the Dice!

Difficulty:Rate
Description
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
Example
[x1,x2] = rollDice();
x1 = 5;
x2 = 2;

Solution Stats

49.89% Correct | 50.11% Incorrect
Last Solution submitted on Mar 31, 2025

Problem Comments

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers10371

Suggested Problems

More from this Author56

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page