LOOPING

hello guys!!! its very difficult to me on how to use looping.... using while and for... can u give me a technique in looping please... or some basic about looping.... thanks...!!!!!
closed account (zb0S216C)
[--- Section Revoked ---]
Athar beat me to the link.

Just so you know, the excessive use of the exclamation mark is considered shouting, therefore, considered rude. Next time, could you cut down the exclamation mark count.

Wazzak
Last edited on
framework

its ok if the meaning of exclamation mark is shouting.... because what i said is not wrong..... just say hello guys and thanks..... but if u think i'm wrong then sorry...
1. You need to ensure that you have an exit condition to the loop
2. The exit condition needs to change.

For example:
1
2
3
4
5
bool goAgain = true;
while (goAgain)
{
  a++;
}

This will never exit and so a will increase forever. Ensure you do something like this.
1
2
3
4
5
6
bool goAgain = true;
while (goAgain)
{
  a++;
  if (a >= 10) goAgain = false;
}
Topic archived. No new replies allowed.