1:代码如下:

// 3.23.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <iomanip>
#include <iostream>
using namespace std;
void main(void)
{
    int i,j;
    i=1;
    j=1;
    for(i=1;i<10;i++)
    {
        for(j=1;j<i+1;j++)
            cout << i << "*" << j << "=" << setw(2) << i*j ;//set(n)设置域宽为n字符,且靠右排列
        cout<< endl;
    }
}
View Code

相关文章:

  • 2022-01-02
  • 2021-06-05
  • 2022-12-23
  • 2022-01-11
  • 2021-11-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2021-09-04
  • 2021-12-12
  • 2021-07-16
  • 2022-01-06
相关资源
相似解决方案