VFP习题(全) - 大字体 联系客服

发布时间 : 星期三 文章VFP习题(全) - 大字体更新完毕开始阅读70edf90b7cd184254b3535fa

procedure sub3 k=k*k return

77.阅读程序,写出运行结果 set talk off clear a=1 b=10

do while a<5 c=1 do while c<=2*a-1 @ a,b say “*” c=c+1 b=b+1 enddo b=10 a=a+1

——33——

enddo

set talk on return

78.阅读程序,写出运行结果 SET TALK OFF I=1 X=0

DO WHILE I<=4

X=X+I I=I+1 ENDDO ?X

SET TALK ON

79.

——34——

如图所示,文字”计算机”所在的文本框为TEXT1,字符”*”所在下拉列表框为COMBO1,右侧文本框为TEXT2,按钮”=>”CLICK事件中的代码如下: a=trim(thisform.text1.value) store thisform.combo1.value to b,c for n=1 to len(a) step 2 c=c+substr(a,n,2)+b if n!=len(a)-1

——35——

c=c+b endif endfor

thisform.text2.value=c

保持表单中各控件内容不变,点击”=>”按钮,写出文本框TEXT2中显示的内容。

80.

如图所示:文字”拼音ABC”所在文本框为TEXT1,文字””智能”所在文本框为TEXT2,按钮”=>”的CLICK事件中代码如下:

——36——

If len(thisform.text1.value)!=0 thisform.text2.value=thisform.text2.value+subs(thisform.text1.value,1,2) thisform.text1.value=subs(thisfor.text1.value,3) endif

保持TEXT1和TEXT2中的文字不变,点击”=>”按钮3次后,写出TEXT1和TEXT2中的文字。

——37——