I’m on vacation. The name of the city I’m staying in now has three identical vowels in it (and no other vowels).
Same applies to the country I’m in, albeit with another vowel.
By now I know that the above statements do not uniquely identify my location, so your solutions may list some other places answering the above description.
Please provide your suggestions – the more the merrier…
... for only one city: Toronto, Canada.
I went to the city list on Wikipedia and went to each of the letters of the alphabet a city name could begin with, copied the tables (two columns: city and country) into one Excel spreadsheet, saved the sheet as a tab-delimited text file, and had a program search the 3517 city names and came up with only one.
The Wikipedia article show only cities of 100,000 people or more so I didn't get the smaller towns on armando's list. I wonder how he found so many.
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
Open "City list.txt" For Input As #1
Line Input #1, l$
ix = InStr(l, Chr(9))
city$ = Left(l, ix - 1)
country$ = Mid(l, ix + 1)
cityv$ = "": countryv$ = ""
For i = 1 To Len(city)
If InStr("aeiouy", Mid(city, i, 1)) > 0 Then
cityv = cityv + Mid(city, i, 1)
If Len(cityv) = 3 Then
If Left(cityv, 1) = Mid(cityv, 2, 1) And Left(cityv, 1) = Right(cityv, 1) Then
For i = 1 To Len(country)
If InStr("aeiouy", Mid(country, i, 1)) > 0 Then
countryv = countryv + Mid(country, i, 1)
If Len(countryv) = 3 Then
If Left(countryv, 1) = Mid(countryv, 2, 1) And Left(countryv, 1) = Right(countryv, 1) Then
Text1.Text = Text1.Text & city & " " & country & crlf
Loop Until EOF(1)
Text1.Text = Text1.Text & " done"
Posted by Charlie
on 2016-06-21 10:32:32