Current location - Training Enrollment Network - Mathematics courses - Vba mathematical function rnd
Vba mathematical function rnd
change of heart

14No. 1 122334456677

Randomly select one from 1 to 14, arrange the remaining 13, and then randomly select one from 1 to 13 until 10 is selected.

I, j and k are represented as integers.

Dim a( 14) is an integer.

For i = 1 to 14.

a(i) = Int((i + 1) / 2)

Next, I

For i = 1 to 10.

j = Int(( 14 - i) * Rnd + 1)

Cell (1, i) = a(j)

For k = j to14-i.

a(k) = a(k + 1)

Next k

Next, I