+ 1
How can we print factorial no.
3 Respostas
+ 5
With your logic.
+ 4
First enter any number for example you Entered 5 then you have to decrease Entered number by 1 and u have to make logic for multiply Entered number and decreased no. And store it in another variable.
And again decrease no and multiply it into stored number do same process when u reach at 1 you have to exit and print values .
You can use recursion or using for loop with if condition
0
Recursion is a good option. If you use iteration, I'd go for a while loop.