Precisely two letters must be inserted in each set of brackets so that they finish the
word on the left and start the word on the right. The accurate missing letters should spell out an 8-letter word when read downwards in order (left to right in each row)
in pairs.
TA(_ _)CK
MA(_ _)SK
NE(_ _)AR
ME(_ _)AS
tabu buck
taco cock
take keck
tala lack
tali lick
tapa pack
tape peck *
tare reck
taro rock
made desk *
mama mask
nema maar
nene near
nest star *
nets tsar
meal alas *
mean anas
meet etas
memo moas
mete teas
The overlapping letters from the pairs I've marked with a star form PEDESTAL.
Private Sub Form_Load()
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
Open "\words\words4.txt" For Binary As #1
w$ = Space$(4)
Do
Get #1, , w$
If EOF(1) Then Exit Do
If Left(w, 2) = "ta" Then
wdct(1) = wdct(1) + 1
wd(1, wdct(1)) = w
End If
If Right(w, 2) = "ck" Then
wdct(2) = wdct(2) + 1
wd(2, wdct(2)) = w
End If
If Left(w, 2) = "ma" Then
wdct(3) = wdct(3) + 1
wd(3, wdct(3)) = w
End If
If Right(w, 2) = "sk" Then
wdct(4) = wdct(4) + 1
wd(4, wdct(4)) = w
End If
If Left(w, 2) = "ne" Then
wdct(5) = wdct(5) + 1
wd(5, wdct(5)) = w
End If
If Right(w, 2) = "ar" Then
wdct(6) = wdct(6) + 1
wd(6, wdct(6)) = w
End If
If Left(w, 2) = "me" Then
wdct(7) = wdct(7) + 1
wd(7, wdct(7)) = w
End If
If Right(w, 2) = "as" Then
wdct(8) = wdct(8) + 1
wd(8, wdct(8)) = w
End If
Loop
For pair = 1 To 7 Step 2
rhs = pair + 1
For i = 1 To wdct(pair)
For j = 1 To wdct(rhs)
If Right(wd(pair, i), 2) = Left(wd(rhs, j), 2) Then
Text1.Text = Text1.Text & wd(pair, i) & " " & wd(rhs, j) & crlf
DoEvents
End If
Next j
Next i
Text1.Text = Text1.Text & crlf
Next pair
Text1.Text = Text1.Text & "done"
DoEvents
End Sub
|
Posted by Charlie
on 2015-04-24 11:04:56 |