9*9乘法表

/****************************************
* 99乘法表
****************************************/
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
	int result[9][9];
	for (int i = 0; i < 9; i++)
	{
		for (int j = 0; j < 9; j++)
		{
			result[i][j] = (i + 1) * (j + 1);
		}
	}

	for (int m = 0; m < 9; m++)
	{
		for (int n = 0; n < m + 1; n++)
		{
			cout << "\t" << n + 1 << "*" << m + 1 << "=" << result[m][n];
		}
		cout << endl;
	}

	char f[32];
	GetModuleFileName(NULL, f, 32);
	cout << f << endl;

	return 0;
}

c++实现的9*9乘法表,

你可能感兴趣的:(C++,乘法表,9*9)