C language nested loop output of the multiplication table

//输出九九乘法表  
#include <stdio.h>

int main()
{
    int m,n;
    for(m=1;m<=9;m++)
    {
        n=1;
        for(n=1;n<=9;n++)
        {
            printf("%4d",m*n);
        }
        printf("\n");
    }
    return 0;
}
// output the multiplication table triangular 
#include <stdio.h> int main () 
{ int m, n-;
     for (m = . 1 ; m <= . 9 ; m ++ ) 
    { 
        n- = . 1 ;
         for (n-= . 1 ; n-<= m; n-++ ) 
        { 
            the printf ( " % 4D " , m * n-); 
        } 
        the printf ( " \ n- " ); 
    } return 0 ; 
}


    
     
// output cam multiplication table 
#include <stdio.h> int main () 
{ int m, n-, T;
     for (m = . 1 ; m <= . 9 ; m ++ ) 
    { for (= n-m; n-< = . 9 ; n-++ ) 
        { 
            the printf ( " % 4D " , m * n-); 
        } 
            the printf ( " \ n- " );
         for (T = 0 ; T <m; T ++ ) 
        { 
            the printf ( " " ); 
        } 
    }

    
            
    return 0;
}

 

Guess you like

Origin www.cnblogs.com/starboy13/p/12604696.html