Alright, the book gave me a definition and I get it...I know what it supposed to do but I have no clue on how to use it...

well...the book says I can use it as power(base, exponent) = base*exponent

alright,
lets say i have a program looping 30 times...
then i say

if ( num <= 1)
return 1; //

else
return num * factorial( num - 1 ) //

}

can anyone tell me whats happening here? or fill in the comment slashes

Try adding some outputs to see what is going on. Please post a compilable sample as opposed to some fragment.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.