- 1、本文档共4页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
vf实验教程答案【DOC精选】
Visual Foxpro 实用教程部分习题答案
习题四(P128)
四、编程题
1.
set talk off
clea
use N_list
zap
for i=1 to 20
input 请输入第+str(i,2)+个数: to x
appe blan
repl data with x
next
index on data tag dt desc
set order to dt
go top
?data
go bott
?data
use
set talk on
retu
2.
set talk off
clea
use Computer
do while not eof()
do case
case 成绩=90 and 成绩=100
str=优秀
case 成绩=80 and 成绩90
str=良好
case 成绩=70 and 成绩80
str=中等
case 成绩=60 and 成绩70
str=及格
otherwise
str=不及格
endcase
repl 评估 with str
skip
endd
use
set talk on
retu
3.
set talk off
clea
use Students
index on 总分 tag cj desc
set order to cj
direction=1
do while not eof()
if direction=1
for i=1 to 12
repl 班级 with i
if not eof()
skip
endif
endf
else
for i=12 to 1 step -1
repl 班级 with i
if not eof()
skip
endif
endf
endif
if direction=1
direction=2
else
direction=1
endif
enddo
index on 班级 tag bj
set order to bj
for i=1 to 12
if i10
s=str(i,1)
else
s=str(i,2)
endif
filename=Class+s+.dbf
copy to filename for 班级=i
next
use
set talk on
retu
4.
set talk off
clea
dime a(8)
use Gzpm
do while not eof()
s=实发工资
yb=int(s/100)
repl 壹佰元 with yb
s=s-yb*100
ws=int(s/50)
repl 伍拾元 with ws
s=s-ws*50
ers=int(s/20)
repl 贰拾元 with ers
s=s-ers*20
sh=int(s/10)
repl 拾元 with sh
s=s-sh*10
wu=int(s/5)
repl 伍元 with wu
s=s-wu*5
er=int(s/2)
repl 贰元 with er
s=s-er*2
repl 壹元 with s
if not eof()
skip
endif
endd
sum to array a
?壹佰元:,str(a(2),4),张
?伍拾元:,str(a(3),4),张
?贰拾元:,str(a(4),4),张
?拾元 :,str(a(5),4),张
?伍元 :,str(a(6),4),张
?贰元 :,str(a(7),4),张
?壹元 :,str(a(8),4),张
use
set talk on
retu
习题三(P66)
五、根据要求设计程序
1.
*用IF语句实现
CLEAR
SET TALK OFF
T=0
clea
INPUT 输入三个数的值: TO A
INPUT to B
INPUT to C
IF AB
T=A
A=B
B=T
ENDIF
IF AC
T=A
A=C
C=T
ENDIF
IF BC
T=B
B=C
C=T
ENDIF
?A,B,C
SET T
文档评论(0)