Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- f1,f2:TextFile;
- i,n,colonIndex:integer;
- s:string;
- c: char;
- begin
- ......................................
- begin
- while not Eof(f1) do begin
- Readln(f1,s);
- n := Length(s);
- colonIndex := Pos(':', s);
- if colonIndex > 0 then
- begin
- for i := (colonIndex + 1) to colonIndex + ((n - colonIndex) div 2) do
- begin
- c := s[i];
- s[i] := s[n - (i - colonIndex) + 1];
- s[n - (i - colonIndex) + 1] := c;
- end;
- end;
- end;
- Writeln(f2,s);
- end;
- ......................................
Add Comment
Please, Sign In to add comment