look at my C program

by Ben (no login)

 

#include <stdio.h>
#include <math.h>
#include <string.h>
int main(int argc,char *argv[]) {
if(argc<6)return 0;
int c,i,j=1,j2;
int j1[]={0,0,0};
float x,y,k,l,kk,ll,rl,im;
for(j2=0;j2<=2;j2++){
for(i=((int)(strlen(argv[j2+3]))-1);i>=0;i--){
j1[j2] += ( *(argv[j2+3]+i)-48 )*j;
j*=10;
}j=1;
}
for(y=-j1[1]>>1;y<=j1[1]>>1;y++){
for(x=-j1[0]>>1;x<=j1[0]>>1;x++){
k=x/j1[2];
l=y/j1[2];
kk=k;
ll=l;
for(i=0;i<=100;i++){
rl=k*k-l*l;
im=2*k*l;
if(fabs(rl*im)>20)break;
k=rl+kk;
l=im+ll;
}
if(i<100){
c=(int)(i)&1;c=c**argv[1]+!c**argv[2];
printf("%c",c);
}else{printf(" ");}
}
printf("\n");
}
return 0;
}

Posted on May 2, 2011, 4:03 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
A version in gfxDark Force on Jun 24
 *i mean s = 1 to 6Dark Force on Jun 24

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement