๐Ÿค ์€์ง€log ๐Ÿค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ๋‘ ์ˆ˜์˜ ๋‚˜๋ˆ—์…ˆ ๋ณธ๋ฌธ

๐ŸŒˆ ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ๋‘ ์ˆ˜์˜ ๋‚˜๋ˆ—์…ˆ

Eun_zii 2022. 11. 15. 10:35

ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค Lv.0

- ๋‘ ์ˆ˜์˜ ๋‚˜๋ˆ—์…ˆ

๐Ÿ’š ๋ฌธ์ œ์„ค๋ช…

  • ์ •์ˆ˜ num1๊ณผ num2๊ฐ€ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ์ฃผ์–ด์งˆ ๋•Œ, num1์„ num2๋กœ ๋‚˜๋ˆˆ ๊ฐ’์— 1,000์„ ๊ณฑํ•œ ํ›„ ์ •์ˆ˜ ๋ถ€๋ถ„์„ return ํ•˜๋„๋ก soltuion ํ•จ์ˆ˜๋ฅผ ์™„์„ฑํ•ด์ฃผ์„ธ์š”.

 

๐Ÿ’š ์ œํ•œ์กฐ๊ฑด

  • 0 < num1 ≤ 100
  • 0 < num2 ≤ 100

 

๐Ÿ’š ๋ฌธ์ œ

function solution(num1, num2) {
    var answer = 0;
    return answer;
}

 

๐Ÿ’š ํ’€์ด

function solution(num1, num2) {
const x = (num1 / num2) * 1000 
    return x << 0;
}

 

 

 

728x90