I want an overall while loop that is executed until a certain condition is true (let's say J=13).
The whole loop starts with J=5 and j=1 and inside the while loop j is raised +1 until j =J. Then the second while loop starts with J = J+1.
How can I shorten this code with one while loop ?
J=5;j=1;while (j<7) if (j>J) break end z=63*pi*(J-j); j=j+1; disp(z)endJ=J+1;j=1;while (j<7) if (j>J) break end z=63*pi*(J-j); j=j+1; disp(z)endJ=J+1;j=1;while (j<7) if (j>J) break end z=63*pi*(J-j); j=j+1; disp(z)end..... (and so on until J=13)
Best Answer