본문 바로가기

Python_WEB/JavaScript

[freecodecamp]JavaScript 십진수 만들기

반응형

변수에 십진수도 저장할 수 있습니다.

10 진수는 부동 소수점 숫자 또는 부동 소수점이라고도합니다.

 

모든 실수를 부동 소수점으로 정확하게 표현할 수있는 것은 아닙니다.

이로 인해 반올림 오류가 발생할 수 있습니다.

 

https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems

 

Floating-point arithmetic - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search Computer format for representing real numbers This article is about the method of representing a number. For the album, see Floating Point. An early electromechanical programmable comp

en.wikipedia.org

 

Q>

1. myDecimal 변수를 만들고 소수 부분이있는 10 진수 값 (예 : 5.7)을 제공합니다.

2. myDecimal은 숫자 여야합니다.

3. myDecimal에는 소수점이 있어야합니다.

 

A>

var ourDecimal = 5.7;

// Only change code below this line
var myDecimal = 5.7;

 

https://www.freecodecamp.org/

 

freeCodeCamp.org

Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.

www.freecodecamp.org

 

반응형