您的位置:首页 > 编程语言 > VB

15电气郄慧敏vb作业计算一位数乘以一位数

2016-04-14 17:23 337 查看
1打开软件,建立两个text,一个commandbutton,双击,在窗口中输入以下内容。

2

Dim n1 As Byte

Dim n2 As Byte

Dim shang As Byte

Dim yushu As Byte

Dim tempresult As Byte

n1 = Int(Val(Me.Text1.Text))

n2 = Int(Val(Me.Text2.Text))

tempresult = n1 * n2

yushu = tempresult Mod 10

shang = tempresult \ 10

Print shang; yushu

3点击运行,输入数字,点击运行的commang button即可看到结果。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: