VB编程题,怎么做啊???麻烦详细代码,谢谢啦

VB编程题,怎么做啊???麻烦详细代码,谢谢啦,第1张

新简猛建工程,添加两个文本框Text1和Text2,添加一个按钮Command1.

代码如下。拦姿桥

以下假设要转换的都是19XX年出生册伏的。

Dim Weight(17) As Integer

Dim CheckCode As String

Private Sub Command1_Click()

Dim i As Integer

Dim OldID As String, NewID As String

Dim Position As Integer

OldID = Left(Text1.Text, 6) &"19" &Right(Text1.Text, 9)

For i = 1 To 17

Position = Position + Val(Mid(OldID, i, 1)) * Weight(i)

Next i

Position = Position Mod 11

NewID = OldID &Mid(CheckCode, Position + 1, 1)

Text2.Text = NewID

End Sub

Private Sub Form_Load()

Weight(1) = 7

Weight(2) = 9

Weight(3) = 10

Weight(4) = 5

Weight(5) = 8

Weight(6) = 4

Weight(7) = 2

Weight(8) = 1

Weight(9) = 6

Weight(10) = 3

Weight(11) = 7

Weight(12) = 9

Weight(13) = 10

Weight(14) = 5

Weight(15) = 8

Weight(16) = 4

Weight(17) = 2

CheckCode = "10X98765432"

End Sub

CACDA

BDABC

B

MsgBox

Val Str/Cstr

frm vbp

判断读取文件是否结尾

21

一.

6 i "*"

二.

0 100 i+1

三.

Dim a1 As Single,a2 As Single,a3 As Single

a2=(64-6*y)+3*x

Print a1+a3

四.

a=1

For i=1 to 7

Print a

五.

s=0

For i=1 to 100 Step 2

s=s+i

六.

cj>=60


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12383789.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存