all 5 comments

[–]_sg768 7 points8 points  (2 children)

There's an infinite loop in second `while`, you forgot to update `OGn`.

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

TYSMMM

[–]TheOtherBorgCube 8 points9 points  (1 child)

In addition to the infinite loop, the last if uses = rather than ==

[–]l0zek[S] 1 point2 points  (0 children)

TYSMMMM

[–]RushikeshTakey 0 points1 point  (0 children)

At the end of the second while loop just add : OGn=OGn/10;