Anyone can fix my code? It's always show 1 why is that | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Anyone can fix my code? It's always show 1 why is that

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

10th May 2023, 2:40 PM
Leonard
3 Answers
+ 5
Start0 is always greater than solve0. Input: 2 8 start0 = 2 solve0 = -6 2 > -6 Input: 8 6 start0 = 8 solve0 = 2 So the for loop is not run.
10th May 2023, 2:59 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 2
Thx it's fixed yeah it's factorial
10th May 2023, 3:15 PM
Leonard
+ 1
10th May 2023, 3:15 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar