// nested while loops #include int main(void) { int nSize = 20; int stepCount = 1, nCounter = 1; // outer while loop, printing the row while (stepCount <= nSize) { // new line for new row printf("\n"); // inner while loop, printing the column while (nCounter <= stepCount) { // increment by 1 ++nCounter; // print character 'W' printf("W"); } // reset nCounter back to 1 for new counting nCounter = 1; // increment stepCounter by 1 (new row) ++stepCount; } printf("\n"); return 0; }