// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
public class Log2 {
   public static int fac(int n) {
      int res;
      if (n <= 1) {
         res = 1;
      } else {
         res = n * fac(n - 1);
      }
      if(Logging.log)   Logging.dbg.println("fac : n = " + n + " res = " + res);
      return res;
   }
   public static void main(String[] args) {
      Logging.log = true;
      System.out.println(fac(50));
   }
}
