|
-
Sep 23rd, 2000, 12:20 PM
#7
Thread Starter
Lively Member
actually the symbols will be computer generated heres the code i got so far:
<code>
Dim A
Dim B
Dim C
Dim D
Dim E
Dim F
Dim G
Dim H
Dim I
Dim J
Private Sub Getarandom_Number()
'// Picking a Random symbol//////////////////////////////////////////////////
Randomize
retval = Int((4 * Rnd) + 1)
If retval = 1 Then retsign = "+"
If retval = 2 Then retsign = "-"
If retval = 3 Then retsign = "*"
If retval = 4 Then retsign = "/"
Text2.Text = retsign
Randomize
retval = Int((4 * Rnd) + 1)
If retval = 1 Then retsign = "+"
If retval = 2 Then retsign = "-"
If retval = 3 Then retsign = "*"
If retval = 4 Then retsign = "/"
Text4.Text = retsign
Randomize
retval = Int((4 * Rnd) + 1)
If retval = 1 Then retsign = "+"
If retval = 2 Then retsign = "-"
If retval = 3 Then retsign = "*"
If retval = 4 Then retsign = "/"
Text6.Text = retsign
Randomize
retval = Int((4 * Rnd) + 1)
If retval = 1 Then retsign = "+"
If retval = 2 Then retsign = "-"
If retval = 3 Then retsign = "*"
If retval = 4 Then retsign = "/"
Text8.Text = retsign
'//end picking a random symbol////////////////////////////////////////////////
End Sub
Private Sub Cmdok_Click()
Getarandom_Number
Attemptto_Solve
End Sub
Private Sub Attemptto_Solve()
'Try and solve given the current numbers and symbols
A = Text1.Text
B = Text2.Text
C = Text3.Text
D = Text4.Text
E = Text5.Text
F = Text6.Text
G = Text7.Text
H = Text8.Text
I = Text9.Text
J = Text10.Text
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|