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

Home > General > Word Problems
From product to town (Posted on 2015-04-10) Difficulty: 4 of 5
If Mieleeke were a name of a city in Europe
then by erasing 4 e’s we would get a word Milk.

Find an edible product such that by inserting four identical letters
into its name we get a name of an European city.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer assisted solution | Comment 1 of 2
The program uses a list of European cities from Wikipedia and looks for entries with 4 or more occurrences of any given letter:

DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
 
'  ChDir "\VB5 projects\flooble"

  Open "cities of europe.txt" For Input As #1
  Do
    Line Input #1, l$
    l$ = LCase$(l$)
    For i = 1 To 26
     c$ = Mid("abcdefghijklmnopqrstuvwxyz", i, 1)
     ct = 0
     For j = 1 To Len(l$)
      If Mid(l, j, 1) = c Then ct = ct + 1
     Next
     If ct >= 4 Then
      Text1.Text = Text1.Text & l$ & "   " & c & crlf
      DoEvents
     
     End If
    Next i
  Loop Until EOF(1)
 
 
 Text1.Text = Text1.Text & "done" & crlf
 


End Sub


It finds:

 stuttgart   t
 saint-denis, reunion   n
 stara zagora   a
 saint-denis, seine-saint-denis   e
 saint-denis, seine-saint-denis   i
 saint-denis, seine-saint-denis   n
 saint-denis, seine-saint-denis   s
 
The edible word is sugar. With the addition of 4 t's it becomes Stuttgart. 


  Posted by Charlie on 2015-04-10 11:07:50
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 (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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