Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming

Journal joe_bruin's Journal: optimize this

optimize this for least number of characters.

main(r,c){for(r=-1,c=0;r<39;c++)printf(c<0?" ":c>r?c=r++-38,"\n":~r&c?" `":" #");}

here's a first rev, -4 bytes.  note that it relies on argc being > 0.

main(c,r){for(r=-1;r<39;c++)printf(c<0?" ":c>r?c=r++-38,"\n":~r&c?" `":" #");}

this started here:
http://slashdot.org/comments.pl?sid=96878&cid=8290149
This discussion has been archived. No new comments can be posted.

optimize this

Comments Filter:

Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P.D. Ouspensky

Working...