daily pastebin goal
84%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2. f1,f2:TextFile;
  3. i,n,colonIndex:integer;
  4. s:string;
  5. c: char;
  6. begin
  7. ......................................
  8. begin
  9.  while not Eof(f1) do begin
  10.         Readln(f1,s);
  11.   n := Length(s);
  12.   colonIndex := Pos(':', s);
  13.   if colonIndex > 0 then
  14.   begin
  15.     for i := (colonIndex + 1) to colonIndex + ((n - colonIndex) div 2) do
  16.     begin
  17.       c := s[i];
  18.       s[i] := s[n - (i - colonIndex) + 1];
  19.       s[n - (i - colonIndex) + 1] := c;
  20.     end;
  21.   end;
  22.   end;
  23. Writeln(f2,s);
  24. end;
  25. ......................................
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top