while loop; a small problem
2 views (last 30 days)
I have the following statement
while abs(k) >= 1
the above code is included inside a main loop
I observe though that when k=1; is outside the main loop the algorithm does not get stuck. When I include it inside the main loop after some iterations it gets stuck.
Would it be wrong to put it outiside loop?
Matt Fig on 21 Aug 2012
This loop, as you written it, should always 'get stuck' because k does not change inside the loop. What are you trying to do with this loop? Do you just want to print the word execute to the screen once through the outer loop?