Multiplication Table Grid
C
Hard
2 views
Problem Description
Print 10x10 multiplication table from nested loop properly formatted. Columns remain aligned. Outer loop rows, inner loop columns.
Official Solution
#include <stdio.h>
int main() {
int i, j;
printf("10 x 10 Multiplication Tablenn");
for (i = 1; i <= 10; i++) { // Outer loop → rows
for (j = 1; j <= 10; j++) { // Inner loop → columns
printf("%4d", i * j); // width = 4 for alignment
}
printf("n");
}
return 0;
}
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!