![[C++] 백준 4단계 - 5597번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FE49JT%2Fbtr6eVMXvQb%2FENEGJrmNs4qrIkWhjcQm6K%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int arr[30] = { 0 }; int input = 0; for (int i = 0; i > input; arr[input - 1] = 1; } for (int i = 0; i < 30; ++i) if (arr[i] != 1) cout
![[C++] 백준 4단계 - 10810번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FFA9Uy%2Fbtr5QAoYv1a%2FaHOrJr3IvIVNHsgIHAwh80%2Fimg.png)
문제설명 소스코드 #include using namespace std; int arr[101]; int N, M; int main() { cin >> N >> M; while (M--) { int i, j, k; cin >> i >> j >> k; for (int u = i; u
![[C++] 백준 4단계 - 2562번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fb0JABy%2Fbtr5O9efwMg%2F9VIS56mKzVfJ6RZKthHMM0%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int max = 0; int idx; int arr[9]; for (int i = 0; i > arr[i]; if (arr[i] > max) { max = arr[i]; idx = i; } } cout
![[C++] 백준 4단계 - 10818번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcenQ92%2Fbtr591ylVeA%2FZBOIfFdIova8Caq3WrlCqk%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int N; int max; int min; cin >> N; int* arr = new int[N]; for (int i = 0; i > arr[i]; max = min = arr[0]; for (int i = 0; i max) max = arr[i]; if (arr[i] < min) min = arr[i]; } cout
![[C++] 백준 4단계 - 10871번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FmA85i%2Fbtr5TnPPNXm%2FAGwYjzPFh32P6uzsaiIjBk%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int N; int X; cin >> N >> X; int* arr = new int[N]; for (int i = 0; i > arr[i]; for (int i = 0; i < N; ++i) if (arr[i] < X) cout
![[C++] 백준 4단계 - 10807번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcnhJ0i%2Fbtr5TqZ5UYI%2F9VNYV7Tndlx34BppTrPRp0%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int arrlength; int num = 0; int input; cin >> arrlength; int* arr = new int[arrlength]; for (int i = 0; i > arr[i]; cin >> input; for (int i = 0; i < arrlength; ++i) if (input == arr[i]) ++num; cout
![[C++] 백준 3단계 - 10951번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbpADzg%2Fbtr5Tn3ncD9%2FmhxWjiy8yXr6Q6DGUCQPw1%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int a, b; while (!(cin >> a >> b).eof()) cout val; cout > a >> b).eof() 방식으로 괄호 안의 cin >> a >> b를 통해 읽은 후 eof상태인지를 검사하는 것이다. 따라서 아래와 같이 소스코드를 작성해야한다. while(!(cin >> a >> b).eof()) { ... } 출처 : https://st-lab.tistory.com/257
![[C++] 백준 3단계 - 10952번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdrFqck%2Fbtr5PFYzNF3%2Fpqn2hmDlt3dp1a0sCJ1Eik%2Fimg.png)
문제설명 소스코드 #include using namespace std; int main() { int A; int B; while (true) { cin >> A >> B; if (A == 0 && B == 0) break; else cout