Multiple conditions in for statement

前端 未结 4 1544
有刺的猬
有刺的猬 2021-01-28 02:20

I have this code in a function, but when it runs it does a long pause and then it says:

$floating point exception

I am assuming this is due to

4条回答
  •  旧时难觅i
    2021-01-28 03:07

    Once you set j to 1 the loop will go on forever. If you want to stop the loop when the if condition is true use break.

提交回复
热议问题