Скачиваний:
289
Добавлен:
04.03.2014
Размер:
1.19 Кб
Скачать
program dima;
uses CRT;
var
st1:string;
j,m,i:integer;
a:array[1..100] of string;
b:boolean;


Procedure Stroka(var st:string);
begin
i:=1;
While i<=length(st)-1 do
if (st[i]=st[i+1]) and (st[i]=' ') then
delete(st,i,1)
else
i:=i+1;
if st[1]=' ' then delete(st,1,1);
end;


Procedure Semetr;
label
1,2;
begin
m:=0;
TextMode(co80);
for i:=1 to length(st1) do begin
if st1[i]=' ' then
for j:=i-m to i-1 do begin
if st1[j]=st1[i-j] then b:=true else b:=false;
end;
if b=true then for j:=i-m to i do begin write(st1[j]); m:=0; b:=false end;
m:=m+1;
end;
readln;
end;


begin
TextBackGround(cyan);
clrscr;
Window(25,5,46,7);
TextBackGround(0);
TextColor(15);
clrscr;
Window(24,4,45,6);
TextBackGround(1);
TextColor(15);
clrscr;
Writeln;
Write(' ‚ўҐ¤ЁвҐ бва®Єг ');
Window(3,10,77,12);
TextBackGround(0);
clrscr;
Window(2,9,76,11);
TextBackGround(red);
clrscr;
GotoXY(2,2);
Readln(st1);
Stroka(st1);
Window(3,10,77,12);
TextBackGround(0);
clrscr;
Window(2,9,76,11);
TextBackGround(red);
clrscr;
GotoXY(2,2);
Write(st1);
st1:=st1+' ';
semetr;
end.
Соседние файлы в папке Alex