#include<stdio.h>
void chengfabiao(int n)//因为这个函数我不需要它返回给主函数值,因此用void
{
int i = 1;
for(i = 1;i <= n;i++)
{
int k=1;
for(k = 1;k <= n;k++)
{
if(k>i)
continue;
printf("%d*%d=%2d ",i,k,i*k);
}
printf("\n");
}
}
int main()
{
int n=0;
scanf("%d",&n);
chengfabiao(n);
return 0;
}
运行结果如图输入9则打印99乘法表输入12则打印12乘法表
标签:12,chengfabiao,自定义,int,打印,printf,乘法表 From: https://blog.51cto.com/u_15838996/6005820