C++ Programming Code Examples C++ > For Loops and While Loops Code Examples nested while loop in C++ programming nested while loop in C++ programming #include <iostream> using namespace std; int main () { int i = 0; while(i < 4) { int j = 0; while(j < 8) { cout << "i = " << i << " and j = " << j << endl; j++; } i++; } return 0; }