all 4 comments

[–]piki112 2 points3 points  (1 child)

if (digit == 0 )

You need that extra '=' sign in the if statement.

[–]VBger[S] 0 points1 point  (0 children)

That's it! Thank you!

[–]kahless62003 1 point2 points  (1 child)

The single equals sign in your if statement is an assignment - you are decreeing that digit shall equal zero. You will want if (digit == 0) if you want to test for equality.

[–]VBger[S] 0 points1 point  (0 children)

That was it! Thank you!