Skip to content

Instantly share code, notes, and snippets.

@ImpregnableProgrammer
Created August 5, 2016 00:02
Show Gist options
  • Save ImpregnableProgrammer/275a23a5bc689e042197b383d33180a4 to your computer and use it in GitHub Desktop.
Save ImpregnableProgrammer/275a23a5bc689e042197b383d33180a4 to your computer and use it in GitHub Desktop.
#include <string.h>
int FE;
void M(int w){
int j=w;
if(j<=FE){
char b[(j*2)-1],k[j*2+1];
b[(j*2)-2]=k[j*2]=0;
memset(b,'_',(j*2)-2);
memset(k,'_',j*2);
int R=((FE+1-j)%2==0);
printf("%*s\n%*s/,%s,\\%s\n",(j*2)+(FE+1)-j,k,FE-j,R ? "o":"",b,R ? "":"o");
j++;
M(j);
}
}
int main(int p){
FE=p-1;
M(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment