程序代码:#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,b,s;
for(a=1;a<10;a++)
{
for(b=1;b<=a;b++)
{
s=a*b;
printf("%2d*%d=%2d ",a,b,s);
}
printf("\n");
}
printf("why I can't change the line??");
system("pause");
return 0;
}之前printf("\n")的位置错了,你肯定是想第一数计算后换行的,所以要把printf("\n");放在第一个for循环内,而不是第二个for循环。










···