Σημείωμα
Η πρόσβαση σε αυτήν τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να εισέλθετε ή να αλλάξετε καταλόγους.
Η πρόσβαση σε αυτήν τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να αλλάξετε καταλόγους.
Fully qualified name: Std.Random.DrawRandomInt
operation DrawRandomInt(min : Int, max : Int) : Int
Summary
Draws a random integer from a uniform distribution
in a given inclusive range. Fails if max < min.
Input
min
The smallest integer to be drawn.
max
The largest integer to be drawn.
Output
An integer in the inclusive range from min to max with uniform
probability.
Example
The following Q# snippet randomly rolls a six-sided die:
let roll = DrawRandomInt(1, 6);