VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5895
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   8805
   LinkTopic       =   "Form1"
   ScaleHeight     =   5895
   ScaleWidth      =   8805
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
Dim pieces As Long
Dim total As Long
Dim five As Long, two As Long, one As Long
pieces = Val(InputBox("纸币张数：", , 30))
total = Val(InputBox("要求组成的总值：", , 100))
For five = 0 To total / 5
For two = 0 To (pieces - five)
one = pieces - five - two
k = 5 * five + 2 * two + one
If k = 100 Then
Print Tab(10); "5元钞票"; five; "张", Space(10); "2元钞票"; two; "张", Space(10); "1元钞票"; one; "张"
End If
Next two
Next five
End Sub

Private Sub Form_Load()

End Sub
