以j*i这种形式打印乘法口诀表

#define _CRT_SECURE_NO_WARNINGS//打印乘法口诀表 以j*i这种形式
#include <stdio.h>
#include <stdlib.h>
int main()
{
	int i;
	int j;
	int n = 9;
	for (i = 1; i <= n; i++)
	{
		for (j = 1; j <= i; j++)
		{
			printf("%d*%d=%d ", j, i, j*i);//注意第三个%d和那个右边双引号有空格
		}
			putchar('\n');//此时的换行作用域应该在第一个for循环里面
		}
		system("pause");
		return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_44840046/article/details/89318558