वीबीस्क्रिप्ट राउंड फंक्शन
❮ पूर्ण वीबीस्क्रिप्ट संदर्भ
राउंड फ़ंक्शन एक संख्या को गोल करता है।
वाक्य - विन्यास
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
2 दशमलव रखते हुए किसी संख्या को गोल कैसे करें:
<%
response.write(Round(24.13278,2))
%>
उपरोक्त कोड का आउटपुट होगा:
24.13
❮ पूर्ण वीबीस्क्रिप्ट संदर्भ