uses CRT;
var strings : array [1..10] of string[8];
i, len, j, count : integer;
ch, ch2 : char;
begin
ClrScr;
{ ввод данных}
for i:=1 to 8 do
begin
Write('Vvedite ', i,'-e slovo : ');
ReadLn(strings[i]);
end;
WriteLn;
count := 0;
for i:= 1 to 8 do
begin
ch := UpCase(strings[i][1]);
len := length(strings[i]);
for j := 2 to len do
begin
ch2 := UpCase(strings[i][j]);
if ch = ch2 then
begin
Inc(count);
WriteLn(strings[i]);
break;
end;
end;
end;
WriteLn;
if count=0 then
WriteLn('Net slow, v kotorih pervi simvol vhodit eshe raz.')
else
WriteLn('Bilo napechatano', count,' slov.');
WriteLn;
Write('Press any key for continue...'); ReadLn;
end.