#include <iostream>
#include <windows.h>
#include <string>
#include <iomanip> using namespace std; int main() { int width; for (int i = 1; i < 10; i++) { for (int j = 1; j <= i; j++) { width = (j == 1) ? 1 : 2; cout << j << "*" << i << "=" << setw(width) << left << i* j << " "; } cout << endl; } system("pause"); return 0; }

 

posted on 2022-08-08 19:11  wshidaboss  阅读(121)  评论(0编辑  收藏  举报