Can I read C++ Programs for Factorial, Fibonacci, and Sorting on EtoBox?
C++ Programs for Factorial, Fibonacci, and Sorting by Yashika Sharma is a document available to read on EtoBox.
What is C++ Programs for Factorial, Fibonacci, and Sorting about?
1. WAP to find the factorial of a number using function and its time complexity. Program: #include #include #include #include long factfn(int f) { long fact=1; for(int i=f;i>0;i--) fact=fact*i; return fact; } void main() { clrscr(); long n,factorial; clock_t start,end; cout<<"Enter the no. to find its factorial using function\n"; cin>>n; start=clock(); factorial=factfn(n); cout<<"\nFactorial of the no. "<<<" is "<
- Author
- Yashika Sharma
- Language
- EN