题解 | #正斜线形图案#
正斜线形图案
https://www.nowcoder.com/practice/61ef68d129534dfbb04b232e1244e447
#include<iostream> using namespace std; int main() { int k; while (cin >> k) { for (int i = 0; i < k; i++) { cout << string(k - 1 - i, ' ') << "*" << endl; } } return 0; }