下面这段是从7个数字中取6个数字不重组合的代码,我想用递归形式把它表现出来,求解
下面这段是从7个数字中取6个数字不重组合的代码,我想用递归形式把它表现出来,求解。 str = "01,02,03,04,05,06,07"
arr = Split(str,",")
length = UBound(arr)
For i = 0 To length
For j = i + 1 To length
For n = j + 1 To length
For w = n + 1 To length
For e = w + 1 To length
For r = e + 1 To length
my_String = my_String & arr(i)&" "&arr(j)&" "&arr(n)&" "&arr(w)&" "&arr(e)&" "&arr(r) & "<br>"
Next
Next
Next
Next
Next
Next