Looping issue

I'm making a nooby program and im trying to loop code, so like when you say yes to something and you want it to go back to a certain line, how do you do so?

What do u have so far ?
While(something is true){many lines of code},
for(something initialized; something to test for, if true exit; something to increment something in the whole loop){many lines of code},
or a do{}while(something is true){many lines of code} loop.

Do{}while() loops are almost exactly like normal while() loops, but a do loop will always run at least once, but a normal while() loop only runs if (this thing in here) is true at the time it is analyzed.

Hope that points you in the beginnings of a direction.
Last edited on
Topic archived. No new replies allowed.