DS3_4

#include <iostream.h> #include <conio.h> int recurdemo(int); int main() { clrscr(); int no; cout<<"\nEnter no. to find factorial : "; cin>>no; cout<<"\nFactorial = "<<recurdemo(no); getch(); return 0; } int recurdemo(int x) { if(x==0) return 1; return recurdemo(x-1)*x; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.