



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















The recursion executes while the original call to the function is still open, i.e., it is not yet finished executing. The recursive step results in many more such calls. To stop recursion, there must be some stopping condition
void main() { int fact=1; int number; cout<<"\n\n Please enter an integer to find its factorial : "; cin>>number; for (int x=number ; x>0 ; x-- ) fact*=x; cout<<"\n\n\t\t The Factorial of " << number << " is : " << fact; }
*// demonstrates arithmetic assignment operators #include
// demonstrates the increment operator #include
// demonstrates sqrt() library function #include