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.87% Correct | 50.13% Incorrect
Last Solution submitted on Feb 22, 2025

Problem Comments

Solution Comments

Show comments
MATLAB Without Borders: Connecting your projects with Python and other Open Source Tools.
On 27th February María Elena Gavilán Alfonso and I will be giving...
0
4

Problem Recent Solvers10343

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