boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

00168.c (294B)


      1 #include <stdio.h>
      2 
      3 int factorial(int i) 
      4 {
      5    if (i < 2)
      6       return i;
      7    else
      8       return i * factorial(i - 1);
      9 }
     10 
     11 int main()
     12 {
     13    int Count;
     14 
     15    for (Count = 1; Count <= 10; Count++)
     16       printf("%d\n", factorial(Count));
     17 
     18    return 0;
     19 }
     20 
     21 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/