Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
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);