Код
uses Crt;
const n='!';
var i,j:byte; words:array[1..100] of string;
c:char; v:string;
f:file of string; g:text;
Begin
ClrScr;
i:=1;
while c<>'.' do
begin
read(c);
if c=' 'then inc(i) else
words[i]:=words[i]+c;
end;
assign(f,'C:\file7');
rewrite(f);
for j:=1 to i do
write(f,words[j]);
close(f);
assign(f,'C:\file7');
reset(f);
for j:=1 to i do
read(f,words[j]);
for j:=1 to i do begin
v:=copy(words[j],1,1);
if v=n then words[j]:='';
end;
close(f);
assign(g,' ',C:\file8');
rewrite(g);
begin
for j:=1 to i do
write(g,words[j]);
end;
close(g);
end.
вот что-то вроде! :p2: