All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Sum and Difference II (Posted on 2017-05-05)
Solve:
w1+w2=w3
w1-w2=w4

knowing that each of the words
w1, w2, w3 & w4
is a distinct member of the set:
(ALUM,ATOM,MORE,OVER).

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution Comment 1 of 1
`over  alum  more  atom  6578  3109  9687  3469 `
The sum is more and the difference is atom.

from

DefDbl A-Z
Dim crlf\$, wd\$(4), n(4)

Private Sub Form_Load()
Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

wd(1) = "alum"
wd(2) = "atom"
wd(3) = "more"
wd(4) = "over"

s\$ = "0123456789": h\$ = s ' alumtover
Do
alum = Val(Mid(s, 1, 4))
atom = Val(Left(s, 1) + Mid(s, 5, 2) + Mid(s, 4, 1))
more = Val(Mid(s, 4, 1) + Mid(s, 6, 1) + Mid(s, 9, 1) + Mid(s, 8, 1))
over = Mid(s, 6, 4)
ord\$ = "1234": h2\$ = ord
n(1) = alum
n(2) = atom
n(3) = more
n(4) = over
Do
w1 = n(Val(Mid(ord, 1, 1)))
w2 = n(Val(Mid(ord, 2, 1)))
w3 = n(Val(Mid(ord, 3, 1)))
w4 = n(Val(Mid(ord, 4, 1)))
If w1 + w2 = w3 And w1 - w2 = w4 Then
Text1.Text = Text1.Text & wd(Val(Mid(ord, 1, 1))) & "  "
Text1.Text = Text1.Text & wd(Val(Mid(ord, 2, 1))) & "  "
Text1.Text = Text1.Text & wd(Val(Mid(ord, 3, 1))) & "  "
Text1.Text = Text1.Text & wd(Val(Mid(ord, 4, 1))) & "  " & crlf
Text1.Text = Text1.Text & n(Val(Mid(ord, 1, 1))) & "  "
Text1.Text = Text1.Text & n(Val(Mid(ord, 2, 1))) & "  "
Text1.Text = Text1.Text & n(Val(Mid(ord, 3, 1))) & "  "
Text1.Text = Text1.Text & n(Val(Mid(ord, 4, 1))) & "  " & crlf & crlf
End If
DoEvents
permute ord
Loop Until ord = h2

permute s
Loop Until s = h

Text1.Text = Text1.Text & crlf & " done"

End Sub

 Posted by Charlie on 2017-05-05 13:47:42
Please log in:
 Login: Password: Remember me: Sign up! | Forgot password

 Search: Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information