Well there are several ways of looping. My code shows you one way. I suggest you experiment with the examples in whatever book/course you are following until you get the hang of them.

The simplest loop - an infinite loop - can be done as follows:
Code:
for (;;)
{
  // put here the statements you want to repeat
  // if you know that when the variable V becomes TRUE you want the loop to end, you
  // can do something like this:
  if (V)
    break;
}
michael j g like this