統(tǒng)計(jì)大寫字母小寫字母數(shù)字和其他字符的個(gè)數(shù)?
首先需要明確0-9的asc代碼為48-57大寫字母是65-90小寫字母是97-122代碼如下:
private sub command1_click()dim x as stringdim y as integerdim xiao,da,shu,qita as integerx=inputbox("請(qǐng)輸入字符串"
)y=len(x)for i=1 to y if asc(mid(x,i,1))>=48 and asc(mid(x,i,1))=65 and asc(mid(x,i,1))=97 and asc(mid(x,i,1))