
14.12.2011, 18:29
|
Новичок
|
|
Регистрация: 12.10.2011
Сообщения: 51
Репутация: 10
|
|
Код:
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
cityname: array [0..1120] of string;
//cityindex: array [0..1120] of Integer;
f:Text;
s:string;
i:Integer;
begin
{ TODO -oUser -cConsole Main : Insert code here }
Assign(f,'cities.txt');
Reset(f);
for i:=0 to 1120 do
Readln(f,cityname[i]);
while s <> 'exit' do
begin
Readln(s);
for i:=0 to 1120 do
begin
if s=cityname[i] then
begin
Writeln(s);
end
else
Writeln('There is no such city! Try again.');
end;
Readln(s);
end;
end;
Close(f);
Readln(s);
end.
|