C语言乘法口诀表代码

我们做个简单的乘法口诀表玩一玩

#include <stdio.h>
#include <stdlib.h>
int main()
{
    
    
int i=0;
for(i=1;i<=9;i++)
{
    
    
int j=1;
for(j=1;j<=i;j++)
{
    
    
printf("%d%d=%-2d ",j,i,i*j);//%2d向右对齐    %-2d向左对齐
}
printf("\n");
}
system("pause");
return 0;
}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_54748281/article/details/113527089
今日推荐