乘法表的特点是列数*行数=结果,列数小于等于当前的行数
#include<iostream>
using namespace std;
int main()
{
//乘法表的特点是列数*行数=结果,列数小于等于当前行数
for (int i = 1; i <= 9;i++)//列
{
for (int j = 0; j <= i;j++)//行
{
cout << i<<"*"<<j<<"="<<i * j << " ";
}
cout << endl;
}
system("pause");
return 0;
}
运算结果: