#include <stdio.h>
int main()
{
int m, n,s;
for ( m = 1; m <=9; m++)
{
for (n = 1; n <= m; n++)
{
s=m*n;
printf("%4d*%d=%d", m,n,s);
}
printf("\n");
}
}
输出下三角乘法表---源自MOOC
最新推荐文章于 2024-09-22 12:09:18 发布
#include <stdio.h>
int main()
{
int m, n,s;
for ( m = 1; m <=9; m++)
{
for (n = 1; n <= m; n++)
{
s=m*n;
printf("%4d*%d=%d", m,n,s);
}
printf("\n");
}
}