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*(num-2)+recurse(num-2);
return r;
}