www.codeup.kr/problem.php?id=1092
[기초-종합] 함께 문제 푸는 날(설명)
C언어기초100제v1.2 : @컴퓨터과학사랑, 전국 정보(컴퓨터)교사 커뮤니티/연구회 - 학교 정보(컴퓨터)선생님들과 함께 수업/방과후학습/동아리활동 등을 통해 재미있게 배워보세요. - 모든 내용
www.codeup.kr
#include<iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int i = 2; for (i = 2; i % a || i % b || i % c; i++) ; cout << i << endl; }
www.codeup.kr/problem.php?id=1096
[기초-2차원배열] 바둑판에 흰 돌 놓기(설명)
#include<iostream> using namespace std; int main() { int n, index1, index2; int arr[20][20] = { 0, }; cin >> n; for (int i = 0; i < n; i++) { cin >> index1 >> index2; arr[index1][index2] = 1; } for (int i = 1; i < 20; i++) { for (int j = 1; j < 20; j++) { cout << arr[i][j] << ' '; } cout << endl; } }