count = 10; while (count > 0) { printf("count is now %d\n", count); count--; }Here, the statements occuring within the enclosing left and right curly braces are executed while the statement within the enclosing round brackets defining the loop is true.
The do {} while() form is also available:
count = 10; do { printf("count is now %d\n", count); count--; } while (count > 0);
In Perl, the last and next statements can
be used to, respectively, prematurely break or continue
on to the next iteration within a loop. In C, the correponding
statements are break and continue.