programming-examples/asp/More_Code_Snippets/This shows how to use the Oct() and Hex() functions to convert.asp
2019-11-18 14:25:58 +01:00

11 lines
454 B
Plaintext

<%
Dim intNumber1 , intNumber2
'our two numbers
intNumber1 = 22
intNumber2 = 65
'convert them both
Response.Write "The octal of " & intNumber1 & " is " & Oct(intNumber1) & "<br>"
Response.Write "The octal of " & intNumber2 & " is " & Oct(intNumber2) & "<br>"
Response.Write "The hexadecimal of " & intNumber1 & " is " & Hex(intNumber1) & "<br>"
Response.Write "The hexadecimal of " & intNumber2 & " is " & Hex(intNumber2) & "<br>"
%>