Do not forget to increase the variable used in the condition, otherwise the loop will never end! If you have read the previous chapter, about the for loop, you will discover that a while loop is much the same as a for loop, with statement 1 and statement 3 omitted.