40 + 16 = 56
27 + 56 = 83
93 + 16 = 109
DefDbl A-Z
Dim crlf$, dr
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr(13) + Chr(10)
' dolasiremf
s$ = "0123456789": hld$ = s
Do
doe = Val(Mid(s, 1, 2))
re = Val(Mid(s, 7, 2))
mi = Val(Mid(s, 9, 1) + Mid(s, 6, 1))
sol = Val(Mid(s, 5, 1) + Mid(s, 2, 2))
la = Val(Mid(s, 3, 2))
si = Val(Mid(s, 5, 2))
fa = Val(Mid(s, 10, 1) + Mid(s, 4, 1))
If doe + si = mi Then
If re + mi = fa Then
If la + si = sol Then
Text1.Text = Text1.Text & doe & Str(si) & " " & mi & crlf
Text1.Text = Text1.Text & re & Str(mi) & " " & fa & crlf
Text1.Text = Text1.Text & la & Str(si) & " " & sol & crlf & crlf
End If
End If
End If
DoEvents
permute s
Loop Until s = hld
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2018-04-21 15:55:57 |