do

Loops through the statements enclosed within the { code block } until the following while test expression is false:

 

do {
statements ;
} while (test expression) ;

 

*note ending ; after the while test expression

 

#include <stdio.h>
int main( ) {
	int i = 1;

	do {
		printf("The value of i is now: %dn",i) ;
		i++ ;
	} while(i < 5) ;

	return 0;
}

Leave a Reply