August 2021 0 10 Report
Помогите построить блок-схему для программы в Pascal: var f,g: Text;
s,s1: string;
p: integer;
begin
Assign(f,'names.txt');
assign(g,'out.txt');
Reset(f);
rewrite(g);
while not Eof(f) do beginReadln(f,s);
while s<>'' do begin
p := pos(',',s);
if p>0 then begin s1 := copy(S,1,p-1); s := copy(S,p+1,length(S)) endelse begin s1 := s; s := '' end;
p := pos(' ',s1);
if p>0 then write(g,copy(S1,p+1,Length(S1)),' ',copy(S1,1,p-1));
if (S<>'')and(S[1]=' ') then Delete(S,1,1);
if S<>'' then write(g,', ');
end;
writeln(g);
end;
Close(f);
Close(g);
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.