human
Factorial of a number without using multiplication | Function to calculate factorial of the number without using multiplication operator.
Variable to store the final factorial.
Outer loop.
Inner loop.
Driver code.
Input.
Function calling"
Solution in Python:
assistant
#Here is code to factorial of a number without using multiplication and the other steps required.
 def factorialWithoutMul ( N ) :
	ans = N
	i = N - 1
	while ( i > 0 ) :
		sum = 0
		for j in range ( i ) :
			sum += ans
		ans = sum
		i -= 1
	return ans
if __name__ == ' _ _ main _ _ ' :
	N = 5
	print ( factorialWithoutMul ( N ) )