
Recursion
How would I write a c program which will recursively compute the product of all even numbers greater than 0 and <= N, for values of N={16,7,9}, and print the results to an output file. For instance, if N=5, the product would be 4 x 2=8.
here is what I have so far,
#include <stdio.h>
main()
{
}
void recurse()
{
static count=1;
int n;
int array[n]={16,17,9};
printf("%d",count);
count++;
n++;
}

A recursive function calls itself. One method would be 
1. Pass in the value 16,7 or 9 into your function.
2. Check to see if it's even and if not minus one.
3. If this value is not zero store the value of this value multiplied by two less than itself.
4. If the value is not zero pass this value into the function (recursively) and add the return value to the value obtained in the previous step.
5. Return the value.
Code:
int recurse(int num)
{
if(num%2!=0)
num;
int r=0;
if(num>0)
r=num*(num2)+recurse(num2);
return r;
}