声明:本空间的内容不全部是原创,如有雷同只为学习与借鉴之方便,别无它意,来者是朋友,愿通过此平台结交天下测试达狼!

支付宝面试题(原创)

上一篇 / 下一篇  2014-03-29 13:56:11 / 个人分类:QTP

1从字符串中分离" http://www.163.com/index.html"出“www.163.com”
 
Dim a51Testing软件测试网.b's7Tv \:Of
a="http://www.163.com/index.html"
(J~ uI-f0b=split (a, "/",-1,1)
MN)Pe ]bYc0msgbox b(3)&" " &b(2)
eR)x G8CX!w0
2 输入任意一个字符串然后把它倒序显示出来
 
Dim str1,str2,str1l51Testing软件测试网5e)_l!gMB]
str1= InputBox("Enter a string","Enter your name:")
@+SHCjt#XB!D0MsgBox ("You entered: " & str1)51Testing软件测试网L)hv&Jo:^F]:XG
str1l=len(str1)51Testing软件测试网JB K_]t0Ssr7\
msgbox str1l-1
};Sh4x;@u!x0reDim str2(str1l-1)51Testing软件测试网x s-C[(~%@ ng
Dim i
P\HvXb9w0i=str1l-151Testing软件测试网%f p WU {!E#R,zyLD
while(i>=0)
CQn+mh VsQK0str2(i)=mid(str1,str1l-i,1)51Testing软件测试网 xF]c$N] a j\
i=i-151Testing软件测试网'S4B@G$l T Y:b9bH$z
wend
Z3R+]B!iMm0msgbox join (str2) ' gnij ieb ot  emoclew

TAG:

 

评分:0

我来说两句

Open Toolbar