int main()
{
int a,n,j,b;
for(a=1;a<=9;a++)
{
printf("%d ",a);
}
printf("\n\n");
for(a=1;a<=9;a++)
printf("- ");
printf("\n\n");
for(n=1;n<=9;n++)
{
for(b=1;b<=9;b++)
{
j=1;
j=b*n;
if(j>=10)
printf("%d ",j);
else
printf("%d ",j);
}
printf("\n\n");
}
printf("\n");
return 0;
}
![这里写图片描述](https://img-blog.csdn.net/20171112195957250?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvRFlGRkY=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
int main()
{
int a,n,j,b,x;
for(a=1;a<=9;a++)
{
printf("%d ",a);
}
printf("\n\n");
for(a=1;a<=9;a++)
printf("- ");
printf("\n\n");
for(n=1;n<=9;n++)
{
x=0;
for(b=1;b<=9;b++)
{
j=1;
j=b*n;
x++;
if(x>n) continue;
else
{
if(j>=10)
printf("%d ",j);
else
printf("%d ",j);
}
}
printf("\n\n");
}
printf("\n");
return 0;
}
![这里写图片描述](https://img-blog.csdn.net/20171112202409280?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvRFlGRkY=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
int main()
{
int a,n,j,b,x=1;
for(a=1;a<=9;a++)
{
printf("%d ",a);
}
printf("\n\n");
for(a=1;a<=9;a++)
printf("- ");
printf("\n\n");
for(n=1;n<=9;n++)
{
x=1;
for(b=1;b<=9;b++)
{
j=1;
j=b*n;
if(x<n)
{
printf(" ");
x++;
}
else
{
if(j>=10)
printf("%d ",j);
else
printf("%d ",j);
}
}
printf("\n\n");
}
printf("\n");
return 0;
}
![这里写图片描述](https://img-blog.csdn.net/20171112204854310?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvRFlGRkY=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)