Algorithm
goorm 공백 없애기, 계산기, 삼각형의 넓이
#include #include using namespace std; int main(void) { string str; getline(cin, str); for (int i = 0; i n1 >> c >> n2; switch(c){ case '+': cout
goorm 비트연산 기본 1, 몫과 나머지, 윤년 (Leap Year)
#include using namespace std; int main(void) { int n1, n2; cin >> n1>>n2; cout
goorm 약수의 합, 모양찍기, 소수 판별
#include using namespace std; int main(void) { int n; cin >> n; int sum = 0; for(int i = 1; i n; for(int i = n; i > 0; i--){ for(int j = 1; j
goorm 네 수의 곱, 비트연산 기본 2, Hello Goorm !
#include using namespace std; int mul(int a, int b){ return a*b; } int main(void){ int n1, n2, n3, n4; cin >> n1 >> n2>> n3 >> n4; cout > a >> b; int rst1 = a>>b; int rst2 = a
goorm Min 함수, 3의 배수 게임, 리그 횟수 경기 구하기
#include using namespace std; int Min(int a, int b){ if(a>b){ return b; } else{ return a; } } int main() { int n1, n2 = 0; cin >> n1 >> n2; cout > n; for(int i = 1; i
goorm 약수 구하기, 최소값, 369 게임
#include using namespace std; int main(void){ int n; // 양의 정수 cin >> n; for(int i = 1; i > input[i]; } min = input[0]; for(int j = 0; j input[j]){ min = input[j]; } } cout
goorm 3과 5의 배수, 시험성적 평균과 등급 구하기, 홀짝 판별
#include #include using namespace std; string fun(int n) { if (n % 2 == 0) { return "even"; } else { return "odd"; } } int main(void) { int n; cin >> n; cout > n; int sum = 0; // 3과 5의 배수의 합 int ex = 0; // 15의 배수의 합 for(int i = 0; i > math >> eng; double avg = (kor + math + eng)/3.0; cout