
주어진 코드 #include #include #include int solution(int korean, int english) { int answer = 0; int math = 210 - korean + english; if (math > 100) answer = -1; else answer = math; return answer; } int main() { int korean = 70; int english = 60; int ret = solution(korean, english); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 주어진 코드 결과 korean english return 70 60 80 코드 문제점 int math = 210 - korean + e..

주어진 코드 #include #include #include int solution(int taekwondo, int running, int shooting[], int shooting_len) { int answer = 0; if (taekwondo >= 25) answer += 빈칸 ; else answer += taekwondo * 8; answer += 250 + (60 - running) * 5; int count = 0; for (int i = 0; i = 7) answer += 빈칸 ; return answer; } int main..

주어진 코드 #include #include #include int solution(int speed, int cars[], int cars_len) { int answer = 0; for (int i = 0; i = speed * 11 / 10 && cars[i] = 빈칸 && cars[i] = 빈칸 ) answer += 7; } return answer; } int main() { int speed = 100; int cars[] = { 110, 98, 125, 148, 120, 112, 8..

주어진 코드 #include #include #include int solution(int ladders[][2], int ladders_len, int win) { int answer = 0; int player[6] = { 1, 2, 3, 4, 5, 6 }; for (int i = 0; i < ladders_len; i++) { int temp = player[ladders[i][0] - 1]; //빈칸 = temp;//빈칸 } answer = player[win - 1]; return answer; } int main() { int ladders[5][2] = { {1, 2}, {3, 4}, {2, 3}, {4, 5}, {5, 6} }; int ladders_len = 5; int win = 3; ..

주어진 코드 #include #include #include int func_a(int time_table[], int time_table_len) { int answer = 0; for (int i = time_table_len - 1; i >= 0; i--) { if (time_table[i] == 1) { answer = i; break; } } return answer; } int func_b(int time_table[], int class1, int class2) { int answer = 0; for (int i = class1; i < class2; i++) if (time_table[i] == 0) answer++; return answer; } int func_c(int time_tab..

주어진 코드 #include #include #include int solution(int height[][4], int height_len) { int count = 0; //빈칸 return count; } int main() { int height[4][4] = { {3, 6, 2, 8}, {7, 3, 4, 2}, {8, 6, 7, 3}, {5, 3, 2, 9} }; int height_len = 4; int ret = solution(height, height_len = 4); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(int height[][4], int height_len..

주어진 코드 #include #include #include int solution(int scores[], int scores_len, int cutline) { int answer = 0; //빈칸 return answer; } int main() { int scores[5] = { 80, 90, 55, 60, 59 }; int scores_len = 5; int cutline = 60; int ret = solution(scores, scores_len, cutline); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(int scores[], int scores_len, int c..
- 배열
- YBM기출
- C++
- lv2
- groomedu
- lv1
- Java
- 알고리즘
- 코스프로
- CosPro
- cospro기출문제
- C
- 자바
- 기출문제
- groom
- 구름에듀 기출문제
- c언어
- Cos Pro
- programmers
- 프로그래머스
- 배열활용문제
- 1급
- YBM
- 코딩테스트
- COSPRO 2급
- 연습문제
- c언어 기출문제
- cospro기출
- 구름 기출문제
- 구름에듀
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |