/Firtree

Obfuscate versions of firtree

Primary LanguageC

Firtree

Obfuscate versions of the Epitech Firtree

The Firtree

An ascii art resizable fir tree based on a f*cking generating algorithm

My programs

Ascii art firtree in ascii art firtree

               g
              (s)
             {;int
            x=s/2;{
             !~0;}
            return\
           s&1?(2*++
          x+8)*x-3:x*
         (2*x+10)+1;};
          main(int x,
         void**y){;int
        d,i,l,O,o,_;if(
       x&1||(x=atoi(1[y]
      ))<1){printf(!1[y]?
     "Usage: %s size\n":0,
       *y);return-!~1;;}
      char*b;for(b=malloc
     ((d=g(x))+1),d/=2,o=0
    ;++o<=x;){for(_=d;O=0<_
   ;)b[--_]=32;while(++O<=3+
  o){for(i=g(o)+(O-o-3)*2,_=l
 =d-i/2;_<l+i;b[_++]=42);i[b+l
   ]=10;write(1,b,++i+l);}}i
  =x;if(~i&1)i++;l=d-i/2;_=0;
 while(_<l+i)b[_++]=_<l?32:124
;_[b]=10;while(x--){;write(1,b,
            l+i+1);}
            free(b);
            return i
            =~1&1;};

Compilation whithout warnings

gcc -Wno-implicit-int -o firtree firtree_art.c 

All code in while condition

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main(int w, int **x, int *y, int z)
{
    while ((1[*x]&1[*x]-1&&(w=atoi(x[w-(y[2<<1]=!(y[1<<!!y]=y[3]=!y))])*!(w^2|(*y=!*x))))&(1[*x]=!!x++[2]&&--x)&(**x=37+(y[2]<(1[*x]&1[*x]-1)?84:y[2]<(**x=!(1[*x]-!!y|1[*x]))+y[!y]?78*(y[4]<=w):46))||y[4]<=2*w&&write((*x[!2]^=89)&&1,*x,((y[2]++>=*y)&&(y[4]<=(y[1]=w)&&y[3]<3+4[y]||++*(1[*x]*4+y)&(y[3]=!*x))^(y[1<<1]=-((y[1]&1?((y[1]/=2,++y[1])+4)*y[1]-1.5:((y[1]/=2)+5)*y[1]+.5)*2-(*y+=(w-(y[!x]=(~(z=4[y])&1?((z/=2)+5)*z+.5:(z/=2)*(++z+4)-1.5)*2+(++*(3+y)-3-4[y])*2))*(y[1<<2]>w)*1[*x]))/2*!!(y[y-y]+=(y[4]-w)*!(*y&1)>!y))||1)[*x])|w)
    {
        // code
    }
    return (0);
}

Compilation whithout warnings

gcc -Wno-incompatible-pointer-types -o firtree firtree_while.c 

Exemples

$ ./firtree 1
   *
  ***
 *****
*******
   |
$ ./firtree 4
              *
             ***
            *****
           *******
            *****
           *******
          *********
         ***********
        *************
         ***********
        *************
       ***************
      *****************
     *******************
    *********************
      *****************
     *******************
    *********************
   ***********************
  *************************
 ***************************
*****************************
            |||||
            |||||
            |||||
            |||||