#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
int main() {
    int row;
    cout << "请输入倒三角的行数:";
    cin >> row;

    for (int i = 1; i <= row; i++) {
        for (int n = 1; n <= row -i+1; n++) {
            cout << "*";
        }
        cout << endl;
    }
    system("pause");
    return 0;
}

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