Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

RLE

Name: Anonymous 2015-03-03 2:25

Here's my implementation of RLE in C.
http://en.wikipedia.org/wiki/Run-length_encoding
What is it in your lang?

#include <stdio.h>
int main(void) {
int i;
char s[] = "%*[_]%n";
for(i = 0; scanf("%c", &s[3]) == 1 && scanf(s, &i) != EOF);
printf("%d%c", ++i, s[3]));
return 0;
}

Name: Anonymous 2015-03-12 11:19

>>14
That's pretty neat.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List