小伟假期同爸爸一起去书店,他选中了七本书,书的总价为175元。小伟爸爸的钱包里有5元8张,10元10张,20元6张,还有一元硬币20个,现在小伟怎么样才能搭配出175元钱买到这七本书,其中,每种货币必须至少要一张(个),请问有几种方法?
Private Sub Command1_click()
Dim x, y, z, m As Integer
Dim c As Integer
c = 0
For x =" 1" To 20
For y =" 1" To 8
For z =" 1" To 10
For m =" 1" To 6
If Then
List1.AddItem "第" + Str(c) + "方法:" + Str(x) + Str(y) + Str(z) + Str(m)
End If
Next m
Next z
Next y
Next x
End Sub