I found this recursive function code in a C book. I do not understand why it works. It seems to me that there is no variable in the function the keep up with the results, yet it works perfectly! Just curious.

Thanks to anyone who can trace this program and show me what it is doing that I cannot see.

tzuch

Code:
#include <stdio.h>

int three_powered(int power);

main(void)
{
	int a=0, fin;

	puts("Enter an exponent:  ");
	scanf("%d", &a);
	
	
	printf("\n3 to the power of %d is %d",a,three_powered(a) );

	puts("\n\nEnter a digit...");
	scanf("%d", &fin);

	return 0;

}

int three_powered(int power)
{
	if(power<1)
	{
		return 1;
	}
	
	else
	{
		return(3*three_powered(power-1));
	}
}