simple rainbow by nu

y;main(a,x,X){for(gets(&a),a%=48;y<a+3;y+=puts(""))for(x=a*4;x+y>a&&x--;putchar("RGB "[X<y?~-X/2?3:X:y<3?y:3]))X=a+y-abs(a+a-x-x/a/2);}

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

download

return to the top page