diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2016-10-10 10:55:59 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2016-10-10 10:55:59 +0700 |
commit | de5650a4375c1102572c8bb7a694e9c0068db29a (patch) | |
tree | 0a4377c3e46be0da80104873d67d73c8d7f4f755 /daily/285easy/2enc.pas | |
parent | 4bc9c7d398bddca1e7ab1072a02b7a22f773cb81 (diff) | |
download | cp-de5650a4375c1102572c8bb7a694e9c0068db29a.tar.gz |
Update /r/dailyprogrammer challenge #285 [Easy]
Diffstat (limited to 'daily/285easy/2enc.pas')
-rw-r--r-- | daily/285easy/2enc.pas | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/daily/285easy/2enc.pas b/daily/285easy/2enc.pas new file mode 100644 index 0000000..96e58c5 --- /dev/null +++ b/daily/285easy/2enc.pas @@ -0,0 +1,22 @@ +var + fi, fo: text; + n, i: cardinal; + + +begin + assign(fi, 'part2.inp'); + assign(fo, 'part2.out'); + reset(fi); + rewrite(fo); + repeat + repeat + read(fi, n); + for i := 1 to n div 255 do + write(fo, 255, ' '); + write(fo, n mod 255, ' ') + until eoln(fi); + writeln(fo) + until eof(fi); + close(fi); + close(fo) +end. |