C Examples Multiplication Table
# C Language Example - Outputting the Multiplication Table
[ C Language Examples](#)
Use nested for loops to output the multiplication table.
## Example
#includeint main(){// Outer loop variable, controls rows int i = 0; // Inner loop variable, controls columns int j = 0; for(i=1;i<=9;i++){for(j=1;j<=i;j++){printf("%dx%d=%dt",j,i,i*j); }// Print a newline after each row printf("n"); }}
Output:
1x1=11x2=22x2=41x3=32x3=63x3=91x4=42x4=83x4=124x4=161x5=52x5=103x5=154x5=205x5=251x6=62x6=123x6=184x6=245x6=306x6=361x7=72x7=143x7=214x7=285x7=356x7=427x7=491x8=82x8=163x8=244x8=325x8=406x8=487x8=568x8=641x9=92x9=183x9=274x9=365x9=456x9=547x9=638x9=729x9=81
[ C Language Examples](#)
YouTip