Skip to content

Instantly share code, notes, and snippets.

@andresgcarmona
Created October 9, 2022 14:39
Show Gist options
  • Save andresgcarmona/5e695ccf352c3978cea1b05bf979c4c2 to your computer and use it in GitHub Desktop.
Save andresgcarmona/5e695ccf352c3978cea1b05bf979c4c2 to your computer and use it in GitHub Desktop.
Mandelbrot in C
int main(int argc, char** argv)
{
int k = 2;
float i,j,r,x,y=-16;
while (puts(""), y++<15)
for (x=0; x++<84; putchar(" .:-;!/>)|&IH%*#"[k&15]))
for (i=k=r=0;
j=r*r-i*i-2+x/25,i=2*r*i+y/10,j*j+i*i<11&&k++<111;
r=j);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment