- 博客(11)
- 收藏
- 关注
原创 将text中的数值转换成十六进制
Private Sub Command1_Click()ClsDim yushu As IntegerDim a As IntegerDim s As Stringyushu = a Mod 16a = a \ 16a = Int(Val(Text1.Text))yushu = aWhile a yushu = a Mod 16 s = f(y
2016-05-07 17:47:39
722
原创 将任意数转换成二进制
Option Base 1Private Sub Command1_Click()Print erjinzhi(230)End SubPrivate Function erjinzhi(m As Byte) As StringClsDim n As Byten = mConst er As Byte = 2Dim shang As Byte, i As Byt
2016-04-28 17:29:55
1074
原创 将23用二进制进行表示
Option Base 1Private Sub Command1_Click()ClsFont.Size = 50Dim shang As Byte, n As StringDim yushu(5) As Byten = 23shang = 23i = 5While shang shang = shang \ 2 yushu(i) = sh
2016-04-28 17:13:27
1085
原创 多位数与一位数相乘
Private Sub Command1_Click()Cls Dim a() As Long, i As Long Dim b As String Dim c As Long Dim changdu As Long changdu = Len(Text1.Text) ReDim a(changdu) For i = 1 To chang
2016-04-21 17:17:47
370
原创 利用vb设计乘法运算
今天下午我历经千辛万苦终于将这个算法让计算机明白。。。。。。。。。。首先在电脑上建立两个text和 command 让后再输入代码Private Sub Command1_Click()ClsMe.Font.Size = 30Dim n1 As ByteDim n2 As ByteDim yushu As ByteDim shang As ByteDi
2016-04-14 16:57:27
3676
原创 “随机十个数相加” 之for 篇
Option ExplicitPrivate Sub Command1_Click()ClsDim a(10) As IntegerDim n As IntegerDim sum As Integern = 1While n a(n) = Int(Rnd * 100)Print a(n)n = n + 1WendFor n = 1 To 10
2016-04-07 17:40:18
558
原创 改进更新 数字排序
前两节课 都在练习数字排序问题 但是枯燥乏味的ctrl+c ctrl+v 实在是将我们的耐心和激情磨灭了。因此必须要将问题大大简化。以下就是简化后的代码Option Base 1Private Sub Command1_Click()ClsMe.Font.Size = 25Size = Int(Val(Me.Text1.Text))Dim A()
2016-03-31 17:17:11
241
原创 一个菜鸟的心路历程.
现在时间是2016年3月31日下午16:50. 邪恶的计算机老师又给我们布置了很多任务。虽然说电脑很好玩。vb很高级 ,但是你不会,不懂,那你就没办法了 ,就比如下面的这个代码Option Base 1Private Sub Command1_Click()ClsMe.Font.Size = 25Dim A(10) As IntegerDim swap
2016-03-31 16:50:48
236
原创 计算机基础 vb练习
将两个数进行大小排序,并在text 中显示最后结果。(思考。。思考。。。再思考!!!!!!)创建button 和 text Private Sub Command1_Click()ClsMe.Font.Size = 50Dim a As IntegerDim b As Integera = Int(Rnd * 1000)b = Int(Rnd *
2016-03-24 16:49:43
459
原创 vb 学习
如何将三个数从大到小排列 。(真难)Private Sub Command1_Click()ClsDim a As IntegerDim b As IntegerDim c As IntegerDim swap As Integera = Int(Rnd * 1000)b = Int(Rnd * 1000)c = Int(Rnd * 1000)If a
2016-03-24 16:38:35
316
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人