주어진 코드 #include #include #include int solution(int temperature[], int temperature_len, int A, int B) { int answer = 0; //빈칸 return answer; } int main() { int temperature[] = { 3, 2, 1, 5, 4, 3, 3, 2 }; int temperature_len = 8; int A = 1; int B = 6; int ret = solution(temperature, temperature_len, A, B); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(..
주어진 코드 #include #include #include int solution(int time_table[], int time_table_len, int n) { int answer = 0; //빈칸 return answer; } int main() { int time_table1[] = {1, 5, 1, 9}; int time_table_len1 = 4; int n1 = 3; int ret1 = solution(time_table1, time_table_len1, n1); printf("solution 함수의 반환 값은 %d 입니다.\n", ret1); int time_table2[] = {4, 8, 2, 5, 4, 6, 7}; int time_table_len2 = 7; int n2 = 4; i..
주어진 코드 #include #include #include int* solution(int score[], int score_len) { int* answer; //빈칸 return answer; } int main() { int score1[] = { 90, 87, 87, 23, 35, 28, 12, 46 }; int score_len1 = 8; int* ret1 = solution(score1, score_len1); printf("solution 함수의 반환 값은 ["); for (int i = 0; i < score_len1; i++) { if (i != 0) printf(", "); printf("%d", ret1[i]); } printf("] 입니다.\n"); int score2[] = { ..
주어진 코드 #include #include #include int solution(int usage) { int answer = 0; if (usage > 30) answer = 20 * 430 + 10 * 570 + (usage - 20) * 840; else if (usage > 20) answer = 20 * 430 + (usage - 20) * 570; else answer = usage * 430; return answer; } int main() { int usage = 35; int ret = solution(usage); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 예시 usage return 35 26900 코드 문제점 if (usage > 30)..
주어진 코드 #include #include #include int solution(int stuffs[], int stuffs_len) { int answer = 0; int small_counter = 0; int general_counter = 0; for (int i = 0; i 3) general_counter += stuffs[i]; else small_counter += stuffs[i]; } if (small_counter < general_counter) answer = small_counter; else answer = general_counter; return answer; } int main() { int stuffs..
주어진 코드 #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..
- c언어
- programmers
- 코스프로
- YBM기출
- CosPro
- 자바
- Cos Pro
- 연습문제
- groom
- 배열활용문제
- lv2
- C++
- 구름에듀
- 프로그래머스
- 배열
- lv1
- 코딩테스트
- c언어 기출문제
- COSPRO 2급
- groomedu
- 1급
- Java
- C
- 구름에듀 기출문제
- 알고리즘
- YBM
- 구름 기출문제
- 기출문제
- cospro기출문제
- 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 | 31 |