C++输出9*9的乘法口诀表

#include <iostream>
using namespace std;

int main() {
    for(int i = 1; i <= 9; i++) {
        for(int j = 1; j <= i; j++) {
            cout << j << " x " << i << " = " << i*j << "\t";
        }
        cout << endl;
    }
    return 0;
}
 

猜你喜欢

转载自blog.csdn.net/SYC20110120/article/details/134706051
今日推荐