Created
October 9, 2022 14:39
-
-
Save andresgcarmona/5e695ccf352c3978cea1b05bf979c4c2 to your computer and use it in GitHub Desktop.
Mandelbrot in C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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