打印9*9乘法口诀表
#include<stdio.h>
int main()
{
int i = 0;
int j = 0;
int n = 1;
for (i = 1; i <= 9; i++)
{
for (j = 1; j <= i; j++)
{
n = i * j;
printf("%2d*%2d=%2d",i,j,n);
}
printf("\n");
}
return 0;
}
输出结果:
打印9*9乘法口诀表
#include<stdio.h>
int main()
{
int i = 0;
int j = 0;
int n = 1;
for (i = 1; i <= 9; i++)
{
for (j = 1; j <= i; j++)
{
n = i * j;
printf("%2d*%2d=%2d",i,j,n);
}
printf("\n");
}
return 0;
}
输出结果: