https://github.com/root-project/root
Raw File
Tip revision: a70b5a421674eba71862352aa7296d9ddc4ba9ba authored by Pere Mato on 05 April 2016, 08:24:40 UTC
Update ROOT version files to v5.34/36.
Tip revision: a70b5a4
t676.cxx
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (root-cint@cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/
#include <stdio.h>

int tree(int x)
{
   static int y=0;
   static int z=0;
   static int qq = printf("%5s","*");

   x = x>0 ? -9: x;
   z = (z=x+5)>0 ? z:-z;
   /* printf("qq=%d\n",qq); */
   printf(!x&&++y ? "\n":(z?(z>y%3+y/3?" ":(x<-5 ?"/" :"\\")):"|"));
   return (y-9) ? tree(++x) : printf("  _|_|_\n  \\___/\n");
}

int main() {
  tree(0);
  return 0;
}
back to top