단순 반복 출력 문제다. 별찍기는 자주 봤었다.
#include <iostream>
using namespace std;
int main(void) {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int a;
int b;
cin >> a >> b;
for (int i = 0; i < b; i++)
{
for (int j = 0; j < a; j++)
cout << '*';
cout << '\n';
}
return 0;
}'Coding_Test 연습 > Programmers' 카테고리의 다른 글
| [프로그래머스] (C++) LV2 오픈채팅방 (0) | 2022.04.28 |
|---|---|
| [프로그래머스] (C++) LV2 문자열 압축 (0) | 2022.04.28 |
| [프로그래머스] (C++) LV1 x만큼 간격이 있는 n개의 숫자 (0) | 2022.04.27 |
| [프로그래머스] (C++) LV1 행렬의 덧셈 (0) | 2022.04.27 |
| [프로그래머스] (C++) LV1 핸드폰 번호 가리기 (0) | 2022.04.27 |