topical media & game development

talk show tell print

graphic-processing-algorithm-Ch01-p33a-p33a.pde / pde



  void setup(){
    println(factorial(5));
  }
  int factorial(int n){
    int fact = 1;
    for(int i=n; i>=1; i-- )
      fact *= i;
    return fact;
  }
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.