Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. var
  2. s,count:string;
  3. f,f2:text;
  4. cnt:integer;
  5. begin
  6. assign(f,'file.txt');
  7. reset(f);
  8. assign(f2,'file2.txt');
  9. rewrite(f2);
  10. cnt := 0;
  11. while(not eof(f)) do
  12. begin
  13. readln(f,s);
  14. inc(cnt);
  15. str(cnt,count);
  16. writeln(f2,count,' ',s);
  17. //if(str[1] = 'b') and (str[length(str)] = 'n') then
  18. //writeln(str);
  19. end;
  20. close(f2);
  21. close(f);
  22. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement