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;
}
相關文章
相關標籤/搜索