需求:根据表A的数据随机生成表B?
[此贴子已经被作者于2024/11/5 15:01:49编辑过]
遍历所有行处理即可,随机值参考:http://www.foxtable.com/webhelp/topics/0349.htm
Dim sum As Integer = 3000
Dim 系数 As Integer = 3
For i As Integer = 1 To 系数 - 1
Dim r As Integer = Rand.Next(1, sum)
sum -= r
Output.Show(r)
Next
Output.Show(sum)