This should be right, if not, lemme know. I tried to shorten in a bit. Supposedly this can be modified to do ovals but I've not tried it.
Code:void circle(int x, int y, int r) { r++; int target = 0; int a = r; int b = 0; int i; while(a >= b) { b = sqrt(r * r - a * a); SWAP(target, b); while(b < target) { plot(x + a, y + b); plot(x - a, y + b); plot(x - a, y - b); plot(x + a, y - b); plot(x + b, y + a); plot(x - b, y + a); plot(x - b, y - a); plot(x + b, y - a); b++; } a--; } }