VBScript

Display number in reverse order using VBScript

Posted on

Write a vbscript function to accept a number .Display it in reverse order. / Display number in reverse order using VBScript

 

Code:

<html>

<head><title>Reverse Number</title>

</head>

<body>

<pre>

<form method=post action=”revnumber.asp”>

Enter Number :<input type=”text” name=”txtno”>

<input type=”submit” value=”Submit”>

</form>

</pre>

</body>

 

revnumber.asp

<%

Dim no,dig,rev

no=trim(request.form(“txtno”))

do while no<>0

dig=no mod 10

rev=(rev*10)+dig

no=no\10

loop

response.write “reverse of digit entered is & nbsp; “& rev

%>

reverse order using VBScript
reverse order using VBScript
Advertisements