不会写代码的大博哥

不会写代码的大博哥

代码:

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a, b;
	printf(" |");

	for (b = 1; b <= 9; b++)
	{
		printf("%3d",b);
	}
	printf("\n");
	for (b = 1; b <= 10; b++)
	{
		printf("---");
	}
	printf("\n");
	for (a = 1; a <= 9; a++)
	{
		printf("%d|",a);
		for (b = 1; b <= 9; b++)
		{
			printf("%3d", a * b);
		}
		printf("\n");
	}



	return 0;
}

运行结果:

2023.7.18-带横纵两个表头的乘法表-LMLPHP

 

07-19 07:19