while loops keep on executing everything between the braces while the condition in brackets is true. Eg:
Code:
int counter = 0; while(counter < 10) {
int counter = 0; while(counter < 10) {
enum TYPE { PT_NULL, PT_PROCESS, PT_VARIABLE, etc }; static const TYPE m_type = PT_NULL;
#include <iostream> using namespace std; int main (void) { int i, j; for(i=1; i<=10; i++) { for(j=1; j<=i; j++) cout << j; cout << endl; // ** you needed this! } return 0; }
Leave a comment: