DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
s$ = "0123456789": h$ = s
Do
If Mid(s, 9, 1) < Mid(s, 10, 1) Then
handy = Val(Left(s, 5))
isVal = Val(Mid(s, 6, 2))
this = 1000 * Val(Mid(s, 8, 1)) + 100 * Val(Left(s, 1)) + isVal
If this * isVal = handy Then
Text1.Text = Text1.Text & this & Str(isVal) & Str(handy) & crlf
End If
End If
permute s
DoEvents
Loop Until s = h
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds
194 94 18236
389 89 34621
9304 4 37216
487 87 42369
489 89 43521
5713 13 74269
where the too-short words represent numbers with leading zeros.
The only solution without leading zeros is:
THIS IS HANDY
5713 13 74269
making the saying:
It was not an easy task, was it?
under the assumption that zero is O and 8 is E.
|
Posted by Charlie
on 2017-06-22 10:34:01 |