typedef struct{float x, y;} seg; seg s[] = {{0, 1}, {1, 0}, {0.7, 0.6}}; void pl(char * k){double x=0, y=0; plot(x, y); while(* k){ if(*k<'A' ||*k >'H') exit(printf("Poo\n")); int n = *k-'A', j=n/2, o=n&1?-1:1; x += o*s[j].x; y += o*s[j].y; ++k; plot(x, y);}}