fork download
  1. program RLE;
  2. uses crt;
  3.  
  4. var s : string; j : byte;
  5.  
  6. procedure count(s : string; var i : byte);
  7. begin
  8. if i = 1 then exit
  9. else if s[i] <> s[i-1]
  10. then begin
  11. count(s, i - j);
  12. writeln(s[i],' : ', j);
  13. end
  14. else begin
  15. count(s, i - 1);
  16. j := succ(j);
  17. end;
  18. end;
  19.  
  20. begin
  21. j := 1;
  22. readln(s);
  23. count(s, length(s));
  24. readln;
  25. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
111233341
compilation info
prog.pas:2: error: module/unit interface `crt' could not be imported
stdout
Standard output is empty