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

Home > General > Word Problems
Hole-some Countries (Posted on 2007-01-16) Difficulty: 3 of 5
There are five countries whose names, when spelt out in capital letters, have no enclosed spaces within the letters.

Find them.

For instance, FRANCE is not acceptable because both the R and the A have enclosed areas, while LEVIK, if it was a country, has no enclosed areas and so would be acceptable.

See The Solution Submitted by Rob    
Rating: 4.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 7 |

OPEN "cntrylst.txt" FOR INPUT AS #1
DO
  LINE INPUT #1, l$
  good = 1
  FOR i = 1 TO LEN(l$)
    IF INSTR("ABDOPQR", MID$(l$, i, 1)) > 0 THEN good = 0: EXIT FOR
  NEXT
  IF good THEN PRINT l$
LOOP UNTIL EOF(1)
CLOSE

produces a list

CHILE
FIJI
LIECHTENSTEIN
ST. KITTS & NEVIS
SEYCHELLES
YEMEN

from which we can eliminate ST. KITTS & NEVIS, as, when AND is spelled out (as well as SAINT), there are letters (rather than a special character), which contain enclosed space.


  Posted by Charlie on 2007-01-16 15:21:28
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 (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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