The program isn't giving correct output though it has zero errors. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The program isn't giving correct output though it has zero errors.

https://code.sololearn.com/cZ5z2xEv22vx/?ref=app

17th May 2021, 9:29 AM
Priyanshu Raj
2 Answers
+ 3
Line 8: Mutiply <factorial> by <i> rather than 1, in the for-loop. factorial *= i;
17th May 2021, 9:35 AM
Ipang
+ 1
Ipang Thank you bro!!! How silly this mistake was. 😑😶
17th May 2021, 9:37 AM
Priyanshu Raj