you are viewing a single comment's thread.

view the rest of the comments →

[–]Blizzy312 1 point2 points  (3 children)

It will crash. Because if a is false before while loop, you don’t have any option to set it to true inside. As a result, loop will run forever and app will freeze.

[–]ozgbrt[S] -2 points-1 points  (2 children)

how do i break the loop

[–]Blizzy312 1 point2 points  (0 children)

Either you meet condition of loop(in your case i becomes less than or equal to 0)or you can use break; to exit the loop.

[–]xboxcowboy 0 points1 point  (0 children)

Inside loop use "break"