用C语言输出任意行列乘法口诀表

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40567865/article/details/82988415

环境: win10 vs2017

#include <stdio.h>
void table(a)
{	
	int i = 0;
	int j = 0;
	for (i=1; i <= a; i++)
	{
		for (j=1; j <= i; j++)
		{
			printf("%d*%d=%2d ", i, j, i*j);
		}
		printf("\n");
	}

}
int main()
{
	int i = 0;
	scanf("%d", &i);
	table(i);
	system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_40567865/article/details/82988415
今日推荐