Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Project2;
- {$APPTYPE CONSOLE}
- uses SysUtils;
- var f:text; m,p:string; z:char;
- begin
- { TODO -oUser -cConsole Main : Insert code here }
- assign(f,'ziaci.txt');
- reset(f);
- while not eof(f) do
- begin
- m:='';
- p:='';
- while not eoln(f) do
- begin
- repeat
- read(f,z);
- if z<>' ' then m:=m+z;
- until z=' ';
- repeat
- read(f,z);
- p:=p+z;
- until eoln(f);
- writeln(m,' ',p);
- writeln(m[1],' ',p[1]);
- writeln;
- end;
- readln(f);
- end;
- close(f);
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment