vf题,谁会呀
答案:1 悬赏:0 手机版
解决时间 2021-05-01 17:48
- 提问者网友:像風在裏
- 2021-05-01 00:34
输入任意ASCII字符串,找出其中的大写字母、小写字母或数字的个数
最佳答案
- 五星知识达人网友:封刀令
- 2021-05-01 01:05
Clear
SET TALK OFF
j=0
ACCEPT "请输入字符串: " to St
L=LEN(St)
c1=0
c2=0
c3=0
FOR i= 1 to L
c=substr(St,i,1)
IF (ASC(c)>=65 AND ASC(c)<=90)
c1=c1+1
ELSE
IF (ASC(c)>=97 AND ASC(c)<=122)
c2=c2+1
ELSE
IF (ASC(c)>=48 AND ASC(c)<=57)
c3=c3+1
ENDIF
ENDIF
ENDIF
NEXT
? "大写字母:", c1
? "小写字母:", c2
? "数字:", c3
SET TALK ON
SET TALK OFF
j=0
ACCEPT "请输入字符串: " to St
L=LEN(St)
c1=0
c2=0
c3=0
FOR i= 1 to L
c=substr(St,i,1)
IF (ASC(c)>=65 AND ASC(c)<=90)
c1=c1+1
ELSE
IF (ASC(c)>=97 AND ASC(c)<=122)
c2=c2+1
ELSE
IF (ASC(c)>=48 AND ASC(c)<=57)
c3=c3+1
ENDIF
ENDIF
ENDIF
NEXT
? "大写字母:", c1
? "小写字母:", c2
? "数字:", c3
SET TALK ON
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯