If i am using line no 19 then the ans outside for loop shows correct output.
if line 19 is commented it shows random number .
Mysterious output coming
just initialize variable ans with 0
If i am using line no 19 then the ans outside for loop shows correct output.
if line 19 is commented it shows random number .
just initialize variable ans with 0