江西省二级上机考试VF上机50题答案.doc

cStr=1111001110000001111111100011111110 zStr=LEFT(cstr,1) cCnt=1 FOR n=2 TO LEN(cStr) IF Substr(cStr,n,1)=SUBSTR(cStr,n-1,1) 比较相邻的两个字符是否相同,相同则累计字符数,否则记# cCnt=cCnt+1 ELSE zStr=zStr+ALLTRIM(STR(cCnt))+# cCnt=cCnt+1 ENDIF ENDIF zStr=zStr+ALLTRIM(STR(cCnt)) wait windows 二进制压缩后为:+zstr cCnt= cCnt +1——cCnt= 1 ENDIF——endfor n1=1 n2=1 nSum=n1+n2 第1和2项之和 i=2 项数,初值为2 DO WHILE nSum=500 t= (1) n1=n2 n2=t+n1 nSum=nSum+n2 i=i+1 ENDDO i= (2) WAIT Windows 前+STR(i)+项的和刚好不大于500 (1) n1 (2) i+1 str1=ThisForm.Text1.Value strleng=len(str1) str2= For i=1 To strleng

文档评论(0)

1亿VIP精品文档

相关文档