Rule 30 by inaniwa

l,i,j,s;\x0d
char a[9999];\x0d
main(){\x0d
  l=strlen(gets(a+2));\x0d
  for(i=0;i<l+2;++i){\x0d
    for(s=j=0;j<3;++j)\x0d
      s+=(a[i+2-j]=='#')?pow(2,j):0;\x0d
    a[i]=(30>>s&1)?'#':' ';\x0d
  }\x0d
  puts(a);\x0d
}\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page