用vb把字符串转ASCII码的问题,很简单的
输入一串单词,把每个单词的ASCII码加29,再输出这个数,像“a”的ASCII码为97,ASCII97-29=68,ASCII码为68的是“D”,输出“D”,那么输入“...
输入一串单词,把每个单词的ASCII码加29,再输出这个数,像“a”的ASCII码为97,ASCII97-29=68,ASCII码为68的是“D”,输出“D”,那么输入“head”输出什么?用VB编程。。。
展开
3个回答
展开全部
Private Sub Form_Click()
Dim a() As String, b As String, c%
b = InputBox("请输入要转换的字符", "")
c = Len(b)
ReDim a(c) As String
For i = 1 To c
a(c) = Mid(b, i, 1)
Print "你输入的第" & i & "个字符" & a(c) & "的Ascii码是:" & Asc(a(c))
Next
End Sub
Dim a() As String, b As String, c%
b = InputBox("请输入要转换的字符", "")
c = Len(b)
ReDim a(c) As String
For i = 1 To c
a(c) = Mid(b, i, 1)
Print "你输入的第" & i & "个字符" & a(c) & "的Ascii码是:" & Asc(a(c))
Next
End Sub
展开全部
CHR(97) & CHR(68)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
s = "head"
t = ""
For i = 1 To Len(s)
t = t & Chr(Asc(Mid(s, i, 1)) - 29)
Next
MsgBox t
t = ""
For i = 1 To Len(s)
t = t & Chr(Asc(Mid(s, i, 1)) - 29)
Next
MsgBox t
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询