C examples for Statement:while
When a while Loop Terminates
#include <stdio.h> int main(void) { int n = 5;//from w w w.jav a 2 s .c o m while (n < 7) { printf("n = %d\n", n); n++; printf("Now n = %d\n", n); } printf("done.\n"); return 0; }