- 博客(10)
- 收藏
- 关注
原创 随机产生一百个数排序
冒泡法Dim a(1 To 100) As IntegerPrivate Sub Command1_Click() Form_LoadEnd SubPrivate Sub Command2_Click() p = "" For i = 1 To 99 For j = 1 To 100 - i If a(j)
2016-05-19 16:47:23
850
原创 随机产生十个数并排序
Dim a(1 To 10) As IntegerPrivate Sub Command1_Click() Form_LoadEnd SubPrivate Sub Command2_Click() p = "" For i = 1 To 9 For j = j + 1 To 10 If a(i) t = a(i)
2016-05-19 16:46:38
1085
原创 选择法排序
Private Sub Command1_Click()Me.Font.Size = 30Dim a(10) As IntegerDim i As IntegerFor i = 1 To 10 a(i) = 10 + Int(Rnd() * 100) Print a(i)Next iPrintDim j As IntegerFor j = 1 T
2016-05-12 17:08:37
246
原创 十进制转为十六进制
当n=23时,Private Sub Command1_Click()Dim n As Stringn = 23Const shiliu As Byte = 16Dim returnS As StringDim shang As ByteDim yushu(1 To 3) As ByteDim i As Bytei = 2shang = n \ shiliu
2016-05-07 17:53:05
277
原创 十进制转二
command中程序当n=23时,Private Sub Command1_Click()Dim n As Byten = 23Const er As Byte = 2Dim returnS As StringDim shang As ByteDim yushu(1 To 5) As ByteDim i As Bytei = 5shang = n \ e
2016-04-28 17:20:26
238
原创 n-2 乘法
Private Sub Command1_Click()Dim c1 As ByteDim c2 As ByteDim a() As ByteDim b As StringDim changdu As Long, i As Longchangdu = Len(Text1.Text)ReDim a(changdu)For i = 1 To changdu
2016-04-28 17:10:21
510
原创 十个随机数字
Dim sum As IntegerDim i As IntegerDim a As Integer在command1中第一种:Private Sub Command1_Click() sum = 0 For i = 1 To 10 Randomize a = Int(1000 * Rnd) sum = su
2016-04-21 16:54:04
928
原创 2016/3/24
比较ab的大小代码为Private Sub Command1_Click()Cls Me.Font.Size = 50 Dim a As Integer Dim b As Integer Dim swap As Integer a = Int(Rnd * 1000) b = Int(Rnd *
2016-03-24 17:16:41
227
原创 2月10日
打开VB并新建工程 从工具栏点击定时器,在窗体中创建定时器控件双击定时器控件,将代码改成PrivateSub Timer1_Timer()屏幕1.Caption = Time()End Sub在窗体创建标签,在属性设置里将标签名改为屏幕1将定时器的Interval属性改为1000 创建两个命令按钮,分别修改代码为Private Sub Comm
2016-03-10 17:23:06
265
原创 2015届电气工程及其自动化2班 熊伟 15050342031 3月2日
1. 打开VB并新建工程 2. 从如图工具栏点击定时器,在窗体中创建定时器控件3. 双击定时器控件,将代码改成Private Sub Timer1_Timer()屏幕1.Caption=Time()End Sub4. 在窗体创建标签,在属性设置里将标签名改为屏幕15. 将定时器的Interval属性改为1000
2016-03-10 17:14:38
424
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅