{nolasa matricas datus(viena rinda vienas matricas rindas skaitli) aprekina rindu summas} uses crt; var f1,f2,f3: text; x,y: string; s1,s2,s3: string; i,s,ch: integer; begin clrscr; writeln('Imya pervogo fajla'); readln(s1); writeln('Imya novogo fajla'); readln(s2); assign(f1,s1); assign(f2,s2); reset(f1); rewrite(f2); while not eof(f1) do begin while not eoln(f1) do begin s:=0; while not chr(44) do begin read(f1,x);val(x,ch,0); s:=s+ch; end; write(f2,s,' '); end; readln(f1); writeln; writeln(f2); end; close(f1); close(f2); readkey end.