怎么改程序才能变为我纸上写的形式

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/6000291346661

img


84.jpg "#left")


int main()
{
    int n, a, b;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 0; j < n - i; j++)
            cout << " ";
        for (int j = 1; j <= i; j++)
            cout << j;
        for (int j = i-1; j > 0; j--)
            cout << j;
        cout << endl;
    }
}