Sitemap

Print china map in six lines of C code

1 min readApr 18, 2014

Learn from How does this code generate the map of India?

First, get a china map bitmap picture and use run-length encoding encode it, get this magic string:

b&M\”D(G*>/#\”;,B1:0=12<924;554D *76`<W#!?UEZ>YCWEWFTJOP$%CXAX@Z? \\#(/&!e)s z#F

Then, print it out use this piece of code:

Get Jin Chen’s stories in your inbox

Join Medium for free to get updates from this writer.

#include <stdio.h>

int main(){int a,b,c; for (b = c = 10; (a =  	"-FIGURE?,China *CJ Hello Folks,\ 	b&M\”D(G*>/#\”;,B1:0=12<924;554D\ 	*76`<W#!?UEZ>YCWEWFTJOP$%CXAX@Z?\ 	\\#(/&!e)s z#F”[b+++21]); ) for(; a— >32 ; ) putchar ( ++c==’d’ ? c = c/10:32|(b&1?0:10)); return 0; }

Here is the output: