0
for loop
why i should but fact=1; (which i but in line 13) in the loop to get correct outbut could anybody explains http://ideone.com/0B1yfH
2 Réponses
+ 2
If you do not reinitialise fact to 1, the old value stored in fact will be used to calculate the factorial of the number in the next iteration of the outer loop.
+ 1
i got it
thank you