VERSION 5.00Begin VB.Form frmMain BorderStyle = 1 'Fixed Single Caption = "24 points" ClientHeight = 4020 ClientLeft = 45 ClientTop = 330 ClientWidth = 5325 Icon = "Form1.frx": 0000 LinkTopic = "Form1" MaxButton = 0' False MinButton = 0 'False ScaleHeight = 4020 ScaleWidth = 5325 StartUpPosition = 3' default window Begin VB.Timer t Interval = 20000 Left = 4440 Top = 2310 End Begin VB.CommandButton cmdExit Caption = "exit" Height = 525 Left = 3330 TabIndex = 6 TOP = 3030 width = 975 End begin vb.commandbutton cmddo caption = "Solve" height = 525 left = 2160 TabINDEX = 1 TOP = 3030 width = 975 End Begin Vb.commandbutton C mdMake Caption = "topic" Height = 525 Left = 960 TabIndex = 0 Top = 3030 Width = 975 End Begin VB.Label lresult AutoSize = -1 'True BeginProperty Font Name = "Arial" Size = 15.75 Charset = 134 Weight = 400 Underline = 0 'false italic = 0'
False Strikethrough = 0 'False EndProperty Height = 315 Left = 450 TabIndex = 7 Top = 1560 Width = 165 End Begin VB.Label lNumberD AutoSize = -1' True Caption = "0" BeginProperty Font Name = "Arial" Size = 48 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0' False Strikethrough = 0 'False EndProperty ForeColor = & H0000C000 & Height = 960 Left = 4200 TabIndex = 5 Top = 300 Width = 480 End Begin VB.Label lNumberB AutoSize = -1' True Caption = "0" beginproperty font name = "Song" SIZE = 48 charset = 134 WEI ght = 400 Underline = 0 'False Italic = 0' False Strikethrough = 0 'False EndProperty ForeColor = & H0080FF80 & Height = 960 Left = 1680 TabIndex = 4 Top = 300 Width = 480 End Begin VB.Label lNumberC AutoSize = -1' True Caption = "0" beginproperty font name = "Song"
Size = 48 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0' False Strikethrough = 0 'False EndProperty ForeColor = & H0000FF00 & Height = 960 Left = 2940 TabIndex = 3 Top = 300 Width = 480 End Begin VB.Label lNumberA AutoSize = -1 'True Caption = "0" BeginProperty Font Name = "Arial" Size = 48 Charset = 134 Weight = 400 Underline = 0' False Italic = 0 False EndProperty ForeColor = & H00C0FFC0 & Height = 960 Left 'False Strikethrough 0 =' = 420 TabINDEX = 2 TOP = 300 width = 480 Endendattribute VB_Name = "frMma in "Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalseDim NumberA, NumberB, NumberC, NumberD As SingleDim A, B, C, D As SingleDim Jieguo As SingleDim ResultExpression As StringDim i As IntegerDim Num As Boolean
Sub Kind (I as integer) Select case: b = numberb: c = Numberc: d = Numberd case 2 a = numbera: b = Numberb: d = numberc: c = Numberd case 3 a = numbera: C = Numberb: b = Numberc: D = Numberd case 4 a = numbera: c = numberb: d = Numberc: b = Numberd case 5 a = numbera: d = numberb: b = numberc: c = Numberd case 6 a = Numbera : D = Numberb: c = Numberc: b = Numberd case 7 b = numbera: a = numberb: c = Numberc: d = Numberd case 8 b = numbera: a = numberb: d = Numberc: c = Numberd case 9 b = Numbera: c = Numberb: a = Numberc: D = Numberd case 10 b = numbera: c = numberb: d = Numberc: a = Numberd case 11 b = numbera: d = numberb: a = numberc: c = Numberd case 12 b = Numbera: D = Numberb: c = Numberc: a = numberd case 13 c = numbera: a = numberb: b = numberc: d = Numberd case 14 c = numbera: a = numberb: d = Numberc: b = Numberd Case 15 C = Numbera: b = Numberb: a = Numberc: D = Numberd case 16 c = numbera: b = numberb: d = numberc: a = n Umberd case 17 c = numbera: d = numberb: a = numberc: b = Numberd case 18 c = numbera: d = numberb: b = Numberc: a = numberd case 19 d = numbera: a = numberb: b = numberc: c = Numberd Case 20 D = Numbera: a = Numberb: c = Numberc: b = Numberd Case 21 D = Numbera: b = Numberb: a = Numberc: c = Numberd case 22 d = numbera: b = numberb: c = Numberc: A = Numberd Case 23 D =
Number: c = Number: a = number: b = number case 24 d = numbera: c = numberb: b = numberc: a = numberndeelectenD Sub
Private sub cmddo_click () for j = 1 to 30 select case j case 1 for i = 1 to 1 call kind (i) jieguo = a b c D if Jieguo = 24 Then ResulTexpression = a & " " & b & " " & C & " " & D & "= 24" NUM = True LRESULT.CAPTION = ResulTexpression Exit for end if Next I Case 2 for i = 1 to 24 call kind (i) jieguo = a b C - D if Jieguo = 24 Then ResulTexpression = A & " " & B & " " & C & "-" & D & "= 24" Num = True LRESULT.CAPTION = ResulTexpression EXIT for End I Case 3 For i = 1 to 24 Call Kind (i) jieguo = a * b c D if Jieguo = 24 Then Resultexpression = A & "*" & B & " " & C & " " & D & "= 24 "Num = True Lresult.caption = ResulTexpression EXIT for IF NEXT I CASE 4 for i = 1 To 24 Call Kind (i) Jieguo = A * B C - D if Jieguo = 24 Then ResulTexpression = A &" * "& B & " " & C & "-" & D & "= 24" NUM = True Lresult.caption = ResulTexpression EXIT for End I Case 5 for i = 1 to 24 CALL KIND (i) Jieguo = a * b * c D if Jieguo = 24 Then ResultExpression = a & "*" & B & "*" & c & " "
& D & "= 24" Num = True Lresult.caption = ResulTexpression EXIT for End If Next I Case 6 for i = 1 To 24 Call Kind (i) Jieguo = A * B * C - D if Jieguo = 24 Then ResulTexpression = A & "*" & b & "*" & c & "-" & d & "= 24" Num = true LRESULT.CAPTION = ResulTexpression EXIT for End If Next I Case 7 for i = 1 to 24 CALL KIND (i ) Jieguo = a * b * c * D if Jieguo = 24 Then ResulTexpression = A & "*" & b & "*" & c & "*" & d & "= 24" Num = true LRESULT.CAPTION = ResulTexpression EXIT For End if Next I Case 8 for i = 1 to 24 Call Kind (i) jieguo = a * b c * D if Jieguo = 24 Then ResulTexpression = A & "*" & B & " " & C & "* "& D &" = 24 "NUM = true Lresult.caption = ResulTexpression EXIT for End If Next I Case 9 for i = 1 To 24 Call Kind (i) Jieguo = A * B - C * D if Jieguo = 24 THEN ResulTexpression = A & "*" & B & "-" & C & "*" & D & "= 24" Num = True LRESULT.CAPTION = ResulTexpression Exit for end if Next I Case 10 for i = 1 to 24 CALL KIND (i) Jieguo = A / B C D if Jieguo = 24 Then ResulTexpression = A & "/" & b & " "
& C & " " & D & "= 24" NUM = True LRESULT.CAPTION = ResulTexpression EXIT for end if Next I Case 11 for i = 1 to 24 call kind (i) jieguo = a * b / c D if Jieguo = 24 Then ResulTexpression = a & "*" & b & "/" & c & " " & d & "= 24" Num = true LRESULT.CAPTION = ResulTexpression Exit for end if Next I Case 12 for i = 1 To 24 Call Kind (i) Jieguo = a * B / C - D if Jieguo = 24 Then ResulTexpression = A & "*" & B & "/" & C & "-" & D & "= 24" Num = TRUE LResult.caption = ResulTexpression EXIT for EndExpression EXIT for i = 1 To 24 Call Kind (i) Jieguo = a * b * c / d ifguo = 14 Then ResulTexpression = a & "*" & b "* "& C &" / "& D &" = 24 "Num = true = RESULTEXPILT.CAPTION = ResulTexpression EXIT for end if Next I Case 14 for i = 1 to 24 call kind (i) jieguo = a * b / c / d IF jieg UO = 24 Then ResulTexpression = a & "*" & b & "/" & c "/" & d & "= 24" Num = true LRESULT.CAPTION = ResulTexpression Exit for end if Next I Case 15 for i = 1 To 24 Call Kind (i) Jieguo = (A B) * C / D if Jieguo = 24 Then ResulTexpression = "(" &
A & " " & B & ") *" & C & "/" & D & "= 24" NUM = true Lresult.caption = ResulTexpression EXIT for End if Next I Case 16 for i = 1 to 24 Call Kind I) Jieguo = (A B) * C * D if Jieguo = 24 Then ResulTexpression = "(" & A & " " & B & ") *" & C & "*" & D & "= 24" NUM = True Lresult.caption = ResulTexpression EXIT for I = 1 To 24 Call Kind (i) Jieguo = (A B) * (C D) IF Jieguo = 24 Then ResulTexpression = "(" & A & " " & B & ") * (" & C & " " & D & ") = 24" Num = true LRESULT.CAPTION = ResulTexpression EXIT for End If Next I Case 18 for i = 1 to 24 Call Kind (i) jieguo = (a b) * (c - d) if jieguo = 24 Then Resultexpression = "(" & A & " " & B & ") * (" & C & "-" & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D & D ") = 24" Num = true LRESULT.CAPTION = ResulTexpression EXIT for End IF NEXT I CASE 19 for i = 1 to 24 Call Kind (i) jieguo = (a - b) * (c - d) if jieguo = 24 Ten ResulTexpression = "(" & A & B & B & ") * (" & C & "& D & ") = 24" Num = true LRESULT.CAPTION =
ResulTexpression EXIT for I = 1 to 24 CALL KIND (I) Jieguo = (A - b) * C / D if Jieguo = 24 Then ResulTexpression = "(" & A & A & "-" & B & B ") *" & C & "/" & d & "= 24" Num = True LRESULT.CAPTION = ResulTexpression EXIT for end if Next I Case 21 for i = 1 to 24 call kind (i) jieguo = (a - b * C * D if Jieguo = 24 Ten ResulTexpression = "(" & A & B & B ") *" & C & "*" & D & "= 24" Num = true LRESULT.CAPTION = ResulTexpression Exit For End if Next I Case 22 for i = 1 to 24 Call Kind (i) Jieguo = (A B C) * Dix Jieguo = 24 Ten ResulTexpression = "(" & A & " " & B & B) "& C &") * "& D &" = 24 "Num = true LRESULT.CAPTION = ResulTexpression Exit for end if Next I Case 23 for i = 1 to 24 call kind (i) jieguo = (A B C ) / D if Jieguo = 24 Then ResulTexpressio n = "(" & A & " " & B & B & B & B & B & B) / "& D &") / "& D &" = 24 "Num = True LRESULT.CAPTION = ResulTexpression Exit for end if Next I Case 24 for i = 1 TO 24 CALL KIND (I) Jieguo = (A B - C) * D if Jieguo = 24 Then ResulTexpression = "(" &
A & " " & B & B "-" & C & ") *" & D & "= 24" Num = true Lresult.caption = ResulTexpression EXIT for End I Case 25 for i = 1 to 24 CALL KIND ( I) Jieguo = a * (b c) D if Jieguo = 24 Then ResulTexpression = a & "* (" & B & " " & C & ") " & D & "= 24" Num = true LRESULT .Caption = ResulTexpression exit for = 1 to 24 call kind (i) jieguo = a * (b - c) D if Jieguo = 24 Then Resultexpression = a & "* (" & b & "-" & C & ") " & D & "= 24" Num = true Lresult.caption = ResulTexpression Exit for end if Next I Case 27 for i = 1 to 24 call kind (i) jieguo = a * (B C) - D if Jieguo = 24 Then ResulTexpression = a & "* (" & B & " " & C & ") -" & D & "= 24" Num = true LRESULT.CAPTION = ResulTexpression EXIT for End IF Next I Case 28 for i = 1 to 24 Call Kind (i) Jieg UO = a * (b - c) - D if jieguo = 24 Then ResulTexpression = a & "* (" & B & "-" & C & ") -" & D & "= 24" Num = true LRESULT.CAPTION = ResulTexpression EXIT for End if Next I Case 29 for i = 1 To 24 Call Kind (i) jieguo = a
(B C) / D if Jieguo = 24 Then Resultexpression = a & " (" & B & " " & C & ") /" & D & "= 24" Num = true LRESULT.CAPTION = ResulTexpression Exit for End If Next i Case 30 ResultExpression = "no solution" Num = True lresult.Caption = ResultExpression End Select If Num = True Then Exit ForNext jEnd SubPrivate Sub cmdExit_Click () EndEnd SubPrivate Sub cmdMake_Click () RandomizeNumberA = Int (Rnd * 10) 1NumberB = Int (Rnd * 10) 1NumberC = Int (Rnd * 10) 1NumberD = Int (Rnd * 10) 1lNumberA.Caption = NumberAlNumberB.Caption = NumberBlNumberC.Caption = NumberClNumberD.Caption = NumberDlresult.Caption = "Please press Solve key! "Cmddo.enabled = truenum = false
End Sub
PRIVATE SUB FORM_LOAD () CMDDO.Enabled = falset.enabled = falselResult.caption = "Please click on the title" "NUM = FALSE
End Sub