UMBC CMSC 201 & 201H Fall '98 | CSEE | 201 | 201 F'98 | lectures | news | help |
void Countdown (int k) { if (k == 0) { printf("KABOOM!!!\n") ; } else { printf(" %d seconds to auto-destruct\n", k); Countdown (k - 1) ; } }
int Factorial (int n) { if (n == 0) { return (1); } else { return (n * Factorial (n - 1))); } }
int Mul( int a, int b) { if (b == 1) { return( a); } else { return (a + Mul (a, b - 1))); } }