DefDbl A-Z
Dim crlf$, used(9)
Private Sub Form_Load()
ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
For g = 1 To 9
used(g) = 1
For i = 1 To 9
If used(i) = 0 Then
used(i) = 1
For o = 0 To 9
If used(o) = 0 Then
used(o) = 1
For f = 0 To 9
If used(f) = 0 Then
used(f) = 1
For x = 0 To 9
If used(x) = 0 Then
used(x) = 1
For n = 0 To 9
If used(n) = 0 Then
used(n) = 1
goval = 10 * g + o
inval = 10 * i + n
fixval = 100 * f + 10 * i + x
If fixval * inval = 999 * goval Then
Text1.Text = Text1.Text & Str(goval) & "/" & inval & " = ." & fixval & fixval & fixval & "..." & crlf
End If
used(n) = 0
End If
Next
used(x) = 0
End If
Next
used(f) = 0
End If
Next
used(o) = 0
End If
Next
used(i) = 0
End If
Next
used(g) = 0
Next
Text1.Text = Text1.Text & crlf & "done"
End Sub
finds
|
Posted by Charlie
on 2014-07-11 13:38:40 |