Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- s,count:string;
- f,f2:text;
- cnt:integer;
- begin
- assign(f,'file.txt');
- reset(f);
- assign(f2,'file2.txt');
- rewrite(f2);
- cnt := 0;
- while(not eof(f)) do
- begin
- readln(f,s);
- inc(cnt);
- str(cnt,count);
- writeln(f2,count,' ',s);
- //if(str[1] = 'b') and (str[length(str)] = 'n') then
- //writeln(str);
- end;
- close(f2);
- close(f);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement