请问这题vb怎么做? 10
3个回答
2019-11-21 · 百度认证:云南新华电脑职业培训学校官方账号
云南新华电脑学校
云南新华电脑学校是经云南省教育厅批准成立的省(部)级重点计算机专业学校,采用三元化管理模式,教学设备先进,师资雄厚学生毕业即就业,学院引进了电商企业入驻,创建心为电商创业园区,实现在校即创业
向TA提问
关注
展开全部
Private Sub Command1_Click()
Dim m%
Dim s$, x$
m = Len(Text1.Text) '答案为Text1.Text 3分
For i = 1 To m
x = Mid$(Text1.Text, i, 1)
If x >= "A" And x <= "Z" Or x >= "a" And x <= "z" Then '答案为x >= "a" And x <= "z" 3分
x = Chr(Asc(x) + n)
If x > "z" Or x > "Z" And x < "a" Then
x = Chr(Asc(x) - 26) '答案26 3分
End If '答案为 End If 3分
End If
s = s + x '修改为x 3分
Next i
Text2.Text = s
End Sub
Dim m%
Dim s$, x$
m = Len(Text1.Text) '答案为Text1.Text 3分
For i = 1 To m
x = Mid$(Text1.Text, i, 1)
If x >= "A" And x <= "Z" Or x >= "a" And x <= "z" Then '答案为x >= "a" And x <= "z" 3分
x = Chr(Asc(x) + n)
If x > "z" Or x > "Z" And x < "a" Then
x = Chr(Asc(x) - 26) '答案26 3分
End If '答案为 End If 3分
End If
s = s + x '修改为x 3分
Next i
Text2.Text = s
End Sub
展开全部
感觉这几个题目都是你发的
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
'计算三角形面积
Function Triangle_Area(ByVal Ax As Double, ByVal Ay As Double, _
ByVal Bx As Double, ByVal By As Double, _
ByVal Cx As Double, ByVal Cy As Double)
Dim a As Double, b As Double, c As Double
Dim p As Double
a = Sqr((Ax - Bx) ^ 2 + (Ay - By) ^ 2)
b = Sqr((Bx - Cx) ^ 2 + (By - Cy) ^ 2)
c = Sqr((Ax - Cx) ^ 2 + (Ay - Cy) ^ 2)
p = (a + b + c) / 2
Triangle_Area = Sqr(p * (p - a) * (p - b) * (p - c))
End Function
Private Sub Command1_Click()
msgbox ("三角形面积:" & Triangle_Area (43,16,64,-12,43,-12))
end sub
Function Triangle_Area(ByVal Ax As Double, ByVal Ay As Double, _
ByVal Bx As Double, ByVal By As Double, _
ByVal Cx As Double, ByVal Cy As Double)
Dim a As Double, b As Double, c As Double
Dim p As Double
a = Sqr((Ax - Bx) ^ 2 + (Ay - By) ^ 2)
b = Sqr((Bx - Cx) ^ 2 + (By - Cy) ^ 2)
c = Sqr((Ax - Cx) ^ 2 + (Ay - Cy) ^ 2)
p = (a + b + c) / 2
Triangle_Area = Sqr(p * (p - a) * (p - b) * (p - c))
End Function
Private Sub Command1_Click()
msgbox ("三角形面积:" & Triangle_Area (43,16,64,-12,43,-12))
end sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询