Const nx=100; var T:text; M:array[1..nx] of string; s,d:string;ch:char; var i,p,j:integer; begin assign(T,'D:\1t\sip.txt');reset(T); while not eof(T) do begin Readln(T,s);p:=1; While p>0 do begin i:= i +1;p:=pos(' ',s);if p>0 then M[i]:=copy(s,1,p-1)else M[i]:=s; delete(s,1,p); //writeln(M[i]); end;end;close(T); for ch:='А' to 'Я' do begin for j:=1 to i do begin if (m[j].Length >0) and (ch = uppercase(copy(m[j],1,1))) then begin //write(ch); writeln(M[j]); M[j]:=''; end;end;end;end.
var T:text; M:array[1..nx] of string; s,d:string;ch:char;
var i,p,j:integer;
begin
assign(T,'D:\1t\sip.txt');reset(T);
while not eof(T) do begin
Readln(T,s);p:=1;
While p>0 do begin
i:= i +1;p:=pos(' ',s);if p>0 then M[i]:=copy(s,1,p-1)else M[i]:=s; delete(s,1,p);
//writeln(M[i]);
end;end;close(T);
for ch:='А' to 'Я' do begin
for j:=1 to i do begin
if (m[j].Length >0) and (ch = uppercase(copy(m[j],1,1))) then begin //write(ch);
writeln(M[j]); M[j]:=''; end;end;end;end.