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;
}
(0)

相关推荐