[Solved] Why is the value of function j not decrementing? [closed]


Change

for(j = 5;j >= 1; j--)

to

for(j = 5;j >= i; j--)  

See the Demo

solved Why is the value of function j not decrementing? [closed]