TO REVERSE THE GIVEN NUMBER IN VBSCRIPT

<html>
 <body>
 <script type="text/vbscript">
 dim n,sum,l,i,J
i=1
sum=""
n=inputbox("Enter any number")
l=len(n)
J=l
document.write("GIVEN NUMBER IS "& n&"<br>")

    do while(i<=l)
    sum=sum+mid(n,J,1)
i=i+1
J=J-1
loop

document.write("REVERSED NUMBER IS = "&sum)
</script>
</body>
</html>

No comments:

Post a Comment