VBScript 라운드 함수
❮ 완전한 VBScript 참조
Round 함수는 숫자를 반올림합니다.
통사론
Round(expression[,numdecimalplaces])
Parameter | Description |
---|---|
expression | Required. The numeric expression to be rounded |
numdecimalplaces | Optional. Specifies how many places to the right of the decimal are included in the rounding. Default is 0 |
예
실시예 1
<%
response.write(Round(24.13278) & "<br />")
response.write(Round(24.75122))
%>
위 코드의 출력은 다음과 같습니다.
24
25
실시예 2
소수점 이하 두 자리를 유지하면서 숫자를 반올림하는 방법:
<%
response.write(Round(24.13278,2))
%>
위 코드의 출력은 다음과 같습니다.
24.13
❮ 완전한 VBScript 참조