| UMBC CMSC 201 Spring '04 | CSEE | 201 | 201 S'04 | 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)));
}
}