hello, my code takes as input the number of fractions then the fractions which are either 1/4,1/2,3/4
and then it counts how many 1s there are for example:
1/4 + 3/4 = 1
1/2 + 1/2 = 1
1/4 + 1/4 + 1/4 + 1/4 = 1
but the line 40 is not executing...
heres the code:
I recommend stepping through it with a debugger. That way, you'll be able to see what's happening to the values of your variables with each line of code.
the problem is solved, its a silly mistake by me (as usual), first min() function returns 1 then im substracting it from fractions[2] thats why min() is returning 0 in line 40