九九乘法表

#include 
using namespace std;
int main()
{	
	for (int i = 1; i <= 9; i++)
	{
		for (int j = 1; j <= 9; j++)
		{
			if (i == j)
			{
				cout << j << "*" << i << "=" << i * j << endl;
				break;
			}
			else cout << j << "*" << i << "=" << i * j << " " ;
		}
	}
}

你可能感兴趣的:(算法)