/* Copyright 2002 David Joiner and the Shodor Education Foundation, Inc. Shodor general use license This code is provided as is, and is offered with no guarantee. This code may be used freely in any non commercial product. Any works using this code must publicly give credit for this work to the Shodor Education Foundation, and should provide in that credit a link to the location of the code on the Computational Science Education Reference Desk (http://www.shodor.org/cserd) as well as to the Shodor Education Foundation (http://www.shodor.org) and to any other authors listed in the copyright statement found within the code. Copyright statements within the code may not be modified. This license does not grant permission for use in any commercial product. */ #include "factorial.h" int factorial(int l) { int i; int retval=1; for (i=2;i=2;i-=2) retval*=i; return retval; }