별을 찍는 문제 2
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int N;
cin >> N;
for (int i = 1; i <= N; i++) {
for (int k = N - i; k > 0; k--) {
cout << " ";
}
for (int j = 0; j < i; j++) {
cout << "*";
}
cout << "\n";
}
}