Private Sub Command1_Click() n = 0 If x >= 0 And y >= 0 And z >= 0 Then If x + y * 2 + z * 5 = 60 Then n = n + 1 End If Print n End If End Sub 我的是这样运行出来是0但是答案是205诶。
Dim i As Long, j As Long, k As Long, n As Long n = 0 For i = 5 To 100 For j = 5 To 50 For k = 5 To 20 If i + j * 2 + k * 5 = 100 Then n = n + 1 Next k Next j Next i MsgBox n本回答被提问者采纳