#include using namespace std;

int main() { int n; cin >> n;

for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
        cout << i << "*" << j << "=" << i * j << " ";
    }
    cout << endl;
}

return 0;

}

描述请从键盘读入一个整数n代表有n行输出n行的99乘法表。比如假设n=5则输出如下:11=121=2 22=431=3 32=6 33=941=4 42=8 43=12 44=1651=5 52=10 53=15 54=20 55=25输入描述一个整数nn=9输出描述n行的99乘法表用例输入 1 3用例输出 1 11=121=2 22=431=3 32=6 33=9来源嵌套循环c++

原文地址: https://www.cveoy.top/t/topic/iCxS 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录