GamerSK

for mato

Jun 19th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.62 KB | None | 0 0
  1. program Project2;
  2. {$APPTYPE CONSOLE}
  3. uses SysUtils;
  4. var f:text; m,p:string; z:char;
  5. begin
  6.   { TODO -oUser -cConsole Main : Insert code here }
  7.   assign(f,'ziaci.txt');
  8.   reset(f);
  9.   while not eof(f) do
  10.     begin
  11.       m:='';
  12.       p:='';
  13.       while not eoln(f) do
  14.         begin
  15.           repeat
  16.             read(f,z);
  17.             if z<>' ' then m:=m+z;
  18.           until z=' ';
  19.           repeat
  20.             read(f,z);
  21.             p:=p+z;
  22.           until eoln(f);
  23.           writeln(m,' ',p);
  24.           writeln(m[1],' ',p[1]);
  25.           writeln;
  26.         end;
  27.       readln(f);
  28.     end;
  29.   close(f);
  30.   readln;
  31. end.
Advertisement
Add Comment
Please, Sign In to add comment