c language practice 8-- output 9 * 9 multiplication table

#include <stdio.h> 
#include <stdlib.h>
 / * Title: 9 * 9 outputs formulas. * / 
Int main () { 
    System ( " Color 1F " );   // set the display frame for the blue white 
    System ( " MODE CON Lines cols = 80 = 30 " );   // fixed display frame size 
    / * *** ************************************** program body parting line (top) ***** ******************* * / 
    int A, B, I; 
    the printf ( " \ n-\ n-multiplication tables --- -------- ----- \ n-\ n-\ n- " );
     for (A = . 1 ; A <= . 9 ; A ++ ) {
        for (B = . 1 ; B <= A; B ++ ) 
            the printf ( " % D * = D%% 2D   " , B, A, A * B); 
        the printf ( " \ n- " ); 
    } 

    / * **** ************************************* program body parting line (bottom) ****** ************************************************************ * / 
    return  0 ; 
}

 

Guess you like

Origin www.cnblogs.com/gougouwang/p/11401635.html