// Demonstration of nested while loops // // Written by: Angela Finlayson // Date: 19/09/2024 // // Print this pattern // // 1 // 1 2 // 1 2 3 // 1 2 3 4 // 1 2 3 4 5 #include #define SIZE 5 int main(void) { int row = 1; while (row <= SIZE) { int col = 1; while (col <= row) { printf("%d ", col); col = col + 1; } printf("\n"); row = row + 1; } }