Recommend/ Explain a program using function named factorial i.e. factorial (int), the program asks user to input a number which is then passed to function which calculates and returns the factorial i.e. 3!= 3x2x1 of number iteratively as we as recursively.
USE C++
Summary :- In this question code for factorial using c++ is written and example is taken as 6 and we know that 6! = 6x5x4x3x2x1 = 720 which is been verified.
Get Answers For Free
Most questions answered within 1 hours.