프로그래머스 풀이/level0

[Programmers] level 0) 문제 '아이스 아메리카노 ' 풀이

진기명기 2023. 2. 26. 14:46
🫠 Programmers (level 0) 
👉🏻 문제 16번 (아이스 아메리카노) : 5,500원으로 최대 몇 잔?

 

 

 


function solution(money){

  // [math.floor를 이용한 값, % 값]
  
   let result = []
   return result = [Math.floor(money / 5500), money % 5500]
  }
}

 

✅ 확인할 점

💡while + counting 해서 구할 수도 있다.