Here's my one-liner:
Draw a circle, without using the CIRCLE command:
Code:
SCREEN 12: h = 200: k = 200: r = 100: c = 13: FOR x = 0 TO INT(r / SQR(2)) + 1: y = SQR(r ^ 2 - x ^ 2): FOR a = -1 TO 1 STEP 2: FOR b = -1 TO 1 STEP 2: PSET (h + x * a, k + y * b), c: PSET (h + y * a, k + x * b), c: NEXT: NEXT: NEXT
draws a circle with center at (h, k), radius r and color c without using the CIRCLE command, or SIN or COS, and just two PSET commands.
It may seems like a long line but it fits inside a QBASIC IDE line of code. ;)
- neuro
[edit]: I see one of the rules is, no compounded lines (with colons)...
Here's another of my favorite algorithms:
purpose: hang the computer uninterruptibly (written in C):
for ( ; ; fork() ) ;
or this one, which goes on and on 4ever... (or just uses up all stack space):
int func(int x) return func(x+1);