vb中查找数字串并求和的代码怎么写 要求用mid取出字符 用布尔型数据...
发布网友
发布时间:2024-10-03 21:33
我来回答
共1个回答
热心网友
时间:2024-10-05 07:00
dim s as string
s="418456safsdfs15s1df51sdf56sd"
dim Boo as Booleen
dim Sum as integer
for i=1 to len(s)
boo= Asc(mid(s,i,1))>=Asc(0) and Asc(mid(s,i,1))<=Asc(9)
if Boo=true then
sum=sum+mid(s,i,1)
end if
next