有一道古代的算術(shù)問題:“有100塊瓦,用100匹馬來馱.大馬1馱3,中馬1馱2,小馬2馱1.問要大馬、中馬、小馬各幾匹(不能沒有)?”
Private Sub Command1_Click( )
Dim x As Integer,y As Integer,z As Integer
For x=1To 33
For y=1To 50
z=100-x-y
If
3*x+2*y+z/2=100
3*x+2*y+z/2=100
Then
Print x,y,z
End If
Next y
Next x
End Sub.