16进制
2016-06-16 17:34
309 查看
Private Sub Command1_Click()
Me.Font.Size = 30
Dim a As Integer
Dim b As Integer
Dim s As String
Dim yushu As Byte
a = 1230: b = 16
While a <> 0
yushu = a Mod b
s = f(yushu) & s
a = a \ b
Wend
Print s
End Sub
Private Function f(yushu As Byte) As String
If yushu <= 9 Then
f = yushu
Else
Select Case yushu
Case 10, 11, 12, 13, 14, 15
f = Chr(yushu + 55)
End Select
End If
End Function
Me.Font.Size = 30
Dim a As Integer
Dim b As Integer
Dim s As String
Dim yushu As Byte
a = 1230: b = 16
While a <> 0
yushu = a Mod b
s = f(yushu) & s
a = a \ b
Wend
Print s
End Sub
Private Function f(yushu As Byte) As String
If yushu <= 9 Then
f = yushu
Else
Select Case yushu
Case 10, 11, 12, 13, 14, 15
f = Chr(yushu + 55)
End Select
End If
End Function
相关文章推荐
- 登陆界面
- 如何把PDF文件内容转换成TXT
- SQL注入(PreparedStatement)
- mongo中删除filed不存在的document
- IOS数据库操作SQLite3使用详解
- IPC网络高清摄像机基础知识5(经典YUV格式详解)
- iOS应用性能调优建议
- 选择法排序
- 信息
- 禁止ViewPager滑动
- 使用junit进行单元测试的注解的执行顺序。
- 用keytool创建Keystore和Trustsotre文件
- 【VMCloud云平台】拥抱Docker(五)Volume(2)
- android 中 Drawable 和 ConstantState 的一些认识
- HC-05嵌入式蓝牙串口通讯
- SpringMVC详细示例实战教程
- Oracle 查看表空间的大小及使用情况sql语句
- css绝对定位和相对定位
- Android的网络Http判断是否连接服务器
- 算法导论 01背包实现