Add a letter, whether same or different, to each of the seven sets of letters below, so that each set can be anagrammed into the name of a country.
1) I U S N T A
2) I U S A T A
3) B E N O N A
4) R E D K M N
5) L A S G N E
6) C R E D O U
7) I N R I E A
Bonus Question: The seven letters, which are added, can be together anagrammed into the name of a country. What is it?
***Adapted from a problem appearing in "Test of Reasoning 4" by Philip J. Carter and Ken A. Russell.
without a computer I got
1) I U S N T A i Tunisia
2) I U S A T A
3) B E N O N A
4) R E D K M N a Denmark
5) L A S G N E
6) C R E D O U
7) I N R I E A g Nigeria
then, with program:
clc, clearvars
seeks={'iusnta', 'iusata', 'benona', 'redkmn', 'lasgne', 'credou', 'inriea'}
for puzzLine=1:7
disp(puzzLine)
sought=seeks{puzzLine};
fid=fopen('c:\vb5 projects\flooble\country list.txt','r');
while ~feof(fid)
l=fgetl(fid);
if length(l)==7
l= lower(l);
tst=l; good=true;
for i=1:6
if contains(tst,sought(i))
ix=strfind(tst,sought(i));
tst(ix(1))=[];
end
end
if length(tst)==1
disp([l ' ' tst])
end
end
end
fclose(fid);
end
seeks =
1×7 cell array
{'iusnta'} {'iusata'} {'benona'} {'redkmn'} {'lasgne'} {'credou'} {'inriea'}
1
tunisia i
2
austria r
3
lebanon l
4
denmark a
5
senegal e
6
ecuador a
7
nigeria g
>>
|
Posted by Charlie
on 2022-01-17 11:26:45 |