C语言打印乘法口诀

#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) 
{
    int a,b,c;
    for(a=1;a<=9;a++)
    {
        for(b=1;b<=a;b++)
        {
            printf("%2d*%2d=%2d ",b,a,a*b);
        }
        printf("\n");
    }
    return 0;
}

 

posted @ 2020-12-02 15:32  飘扬的狗尾草  阅读(157)  评论(0)    收藏  举报