diff --git a/prob1.js b/prob1.js index 2eed222..c7349d8 100644 --- a/prob1.js +++ b/prob1.js @@ -2,6 +2,16 @@ function solution(num, total) { let answer = []; - + let aver = total / num; + let start = aver- num/2+0.5; + for(let i=0; ilikelion[j+1].age){ + [likelion[j].age,likelion[j+1].age] = [likelion[j+1].age,likelion[j].age] + } + + } +} + +console.log(likelion) // 2번 문제 코드작성 let result2 = []; - +for(let i=0; i=24) + { + result2[i]=likelion[i]; + } +} console.log(result2); // 3번 문제 코드작성 let targetName = "전수빈"; let result3 = null; - +for(let i=0; i