Skip to content

Commit ca4d125

Browse files
authored
Merge pull request #118 from DMU-DebugVisual/inseong
예제코드 에러수정
2 parents ff88faf + 1cb87c2 commit ca4d125

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/components/ide/mockData/codeExamples/insertionSort.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const insertionSortExample = `#include <stdio.h>
2-
#define MAX_SIZE 5
32
43
// 삽입 정렬
54
void insertion_sort(int list[], int n) {
@@ -21,8 +20,8 @@ void insertion_sort(int list[], int n) {
2120
2221
int main() {
2322
int i;
24-
int n = MAX_SIZE;
25-
int list[n] = {5, 2, 4, 6, 1};
23+
int n = 5;
24+
int list[5] = {5, 2, 4, 6, 1};
2625
2726
// 삽입 정렬 수행
2827
insertion_sort(list, n);

src/components/ide/mockData/codeExamples/selectionSort.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const selectionSortExample = `#include <stdio.h>
2-
#define MAX_SIZE 5
32
43
// 선택 정렬
54
void selection_sort(int list[], int n) {
@@ -26,8 +25,8 @@ void selection_sort(int list[], int n) {
2625
2726
int main() {
2827
int i;
29-
int n = MAX_SIZE;
30-
int list[n] = {64, 25, 12, 22, 11};
28+
int n = 5;
29+
int list[5] = {64, 25, 12, 22, 11};
3130
3231
// 선택 정렬 수행
3332
selection_sort(list, n);

0 commit comments

Comments
 (0)