역시 쉬운 문제, 함수를 하나 만들고 그 함수를 반복문만큼 반복 출력하게 하면 된다.
#include <iostream>
using namespace std;
void show();
int main() {
int n;
cin >> n;
for(int i = 0; i < n; i++) {
show();
}
return 0;
}
void show() {
cout << "Hello" << endl;
cout << "#@#@#@#@#@" << endl;
cout << "CodeTree" << endl;
cout << "@#@#@#@#@#" << endl;
cout << "Students!" << endl;
cout << endl;
}