Fixed Logical error (#31639)
Fixed Logical error (#31639)

Fixed Logical Error in the Second program
jonathanihm/freeCodeCamp,BhaveshSGupta/FreeCodeCamp,jonathanihm/freeCodeCamp,raisedadead/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,raisedadead/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp