[C++] 백준 2447 별 찍기
·
Algorithm/Baekjoon
#include #include using namespace std; void star(int num, int x, int y, vector& stars); int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int num; cin >> num; vector stars(num); for (int i = 0; i < num; i++) //생성 { for (int j = 0; j < num; j++) stars[i].push_back('*'); } star(num, 0, 0, stars); for (int i = 0; i < num; i++) //출력 { for (int j = 0; j < num; j++) cout