您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > 2001年辽宁专升本考试真题-VFP部分
第1页共9页2001年辽宁省普通专科毕业生升入本科学校招生考试计算机试卷FOXPRO语言在以下各题中,如果要用到数据库CLDA.DBF,均依据以下数据库的结构与内容为准。CLDA.DBF车辆号码(C,10)车辆名称(C,20)购入价格(N,10,2)购入时间(D,8)辽A-37456桑塔那(普通)102000.0005/21/99辽A-Z4047桑塔那(2000)210500.0006/20/99辽A-H2564捷达208500.0004/01/99辽A-27325红旗253800.0004/12/99辽A-46324金杯185400.0005/26/97CLFY.DBF车辆号码(C,10)维修费(N,10,2)租车费(N,10,2)公里表数(N,8)时间(D,8)辽A-Z4047200.000.00135008/02/99辽A-463241000.00560.0056706/04/99辽A-H25640.00380.00125008/12/99辽A-Z4047100.00270.00147009/18/99辽A-374560.001100.0076005/30/99辽A-46324300.000.0061007/23/99辽A-H2564460.00780.00110006/25/99三、填空题(每空3分,共30分)注:从第3小题开始为阅读程序题,请将正确运行结果填到每题的“_________”处。1、表达式SUBSTR(“辽宁省沈阳市”+LEFT(“皇姑区崇山中路66号”,14),7,12)的值是__________________2、FOXPRO系统有交互和_____________________________两种工作方式3、SETTALKOFFSETDELETEONUSECLDADELETEFORMONTH(购入时间)=5PACKGOBOTTOM?“车辆号码:”+车辆号码USESETDELETEOFFSETTALKONRETURN运行结果:_____________________________________第2页共9页4、SETTALKOFFUSECLFYINDEXON车辆号码TOCPHMTOTALON车辆号码TOCPHUSECPHLOCATEFOR车辆号码=“辽A-46324”IFFOUND()?“维修费:”??维修费??”租车费:”??租车费ENDIFUSESETTALKONRETURN运行结果:_______________________________________5、SETTALKOFFSETDELETEONUSECLFYSORTON车辆号码,时间/DTOSCPFIELDS车辆号码,公里表数USESCPCP=车辆号码SKIPDOWHILE.NOT.EOF()IFCP=车辆号码DELETEELSECP=车辆号码ENDIFSKIPENDDOPACKGOBOTTOM?车辆号码+“的行车公里数:”??公里表数USESETDELETEOFFSETTALKONRETURN运行结果:________________________________________6、SETTALKOFFUSECLFYS=0COPYTOARRAYA第3页共9页FORI=1TORECCOUNT()S=S+A(I,3)-A(I,2)ENDFOR?SUSESETTALKONRETURN运行结果:______________________________________7、SETTALKOFFUSECLFYFORI=1TORECCOUNT()IF租车费-维修费0REPLACE租车费WITH租车费-维修费REPLACE维修费WITH0ELSEREPLACE维修费WITH维修费-租车费REPLACE租车费WITH0DNDIFSKIPENDFORCOUNTTOXGOINT(X/2)?“车辆费用:”??租车费-维修费USESETTALKONRETURN运行结果:_______________________________________8、SETTALKOFFSELECT2USECLDASELECT3USECLFYSELECTBJOINWITHCTOCLFORCLDA.车辆号码=CLFY.车辆号码USECLCOUNTTOX?XUSESETTALKONRETURN运行结果:_______________________________________9、SETTALKOFFUSECLFY第4页共9页INDEXON车辆号码TOCPHMUSECLDAIN2SELECT2SETRELATIONTO车辆号码INTOCLFYLOCATEFORCLFY.时间-购入时间30SELECT1?”车辆号码:“+车辆号码USESETTALKONRETURN运行结果:__________________________________10、SETTALKOFFR=1FORI=5TO1STEP-1FORJ=1TOI@R,R+JSAY“*”ENDFORR=R+1ENDFORSETTALKONRETURN运行结果:__________________________________四、完善程序题(1——12小题每小题3分,第13小题4分,共40)请在下列程序“________”处填入正确的内容使程序完整正确。1、显示CLFY.DBF车辆号码为“辽A-H2564”的记录.SETTALKOFFUSECLFYINDEXON车辆号码TOCPHMFIND_________________________DISPLAYUSESETTALKONRETURN2、从CLFY.DBF中物理删除租车费小于维修费的记录SETTALKOFFUSECLFYDOWHILE.NOT.EOF()IF_______________________________________-DELETEPACKENDIFSKIPENDDOUSE第5页共9页SETTALKONRETURN3、求8月份利润SETTALKOFFUSECLFYS=0DOWHILE.NOT.EOF()IF______________________________S=S+租车费-维修费ENDIFSKIPENDDO?SUSESETTALKONRETURN4、显示CLDA.DBF中购入价格最高的记录SETTALKOFFUSECLDAS=0R=1DOWHILE.NOT.EOF()IFS购入价格____________________________________R=RECNO()ENDIFSKIPENDDOGORDISPLAYUSESETTALKONRETURN5、在CLFY.DBF中将时间大于“1999.07.31”的租车费增加200SETTALKOFFUSECLFYDOWHILE.NOT.EOF()IF时间{07/31/99}___________________________________ENDIFSKIPENDDOUSESETTALKON第6页共9页RETURN6、求车辆号码为“辽A-H2564”最近一次的每公里利润。SETTALKOFFSUECLFYSORTON_________________________USESSFY=租车费-维修费G=公里表数SKIPG=G-公里表数PFY=FY/G?PFYUSESETTALKONRETURN7、显示CLFY.DBF中重复的车辆号码。SETTALKOFFUSECIFYSORTON车辆号码TOCPFIELDS车辆号码USECPCPHM=车辆号码SKIPDOWHILE.NOT.EOF()IFCPHM=车辆号码?车辆号码ELSECPHM=车辆号码ENDIF____________________________________________ENDDOUSESETTALKONRETURN8、显示租车费大于1000的车辆名称。SETTALKOFFUSECLDAUSECLFYIN2SELECT2SETFILTERTO租车费1000DOWHILE.NOT.EOF()__________________________________________SELECT1LOCATEFOR车辆号码=CPHM第7页共9页?车辆名称SELECT2SKIPENDDOUSESETTALKONRETURN9、显示CLDA.DBF中满足查询条件的记录SETTALKOFFUSECLDATJ=“”ACCEPT“请输入查询条件:“TOTJDOWHILE.NOT.EOF()IF___________________________DISPLAYENDIFSKIPENDDOUSESETTALKONTETURN10、已知Y(K)+2Y(K-1)+3Y(K-2)=3U(K)+7U(K-1)U(K)=(1/3)K+1(K=0时Y(K)=0)求:Y(10)SETTALKOFFY1=0Y2=0______________________________________________FORK=1TO10U=(1/3)^(K+1)Y=3*U+7*U1-2*Y1-3*Y2U1=UY2=Y1Y1=YENDFOR?YSETTALKONRETURN11、从键盘上输入一个字符串,统计其中含有几个大写字母A。SETTALKOFFCLEARS=0N=1ACCEPT“请输入一串字符:”TOX第8页共9页M=LEN(X)DOWHILEN=MIF_______________________________________S=S+1ENDIFN=N+1ENDDO?SSETTALKONRETURN12、将十进制数转换二进制的程序SETTALKOFFINPUT“请输入正整数N:”TONS=“”DOWHILEN1P=MOD(N,2)S=STR(P,1)+SN=INT(N/2)ENDDO________________________________________________?SSETTALKONRETURN13、显示下面图形的程序*********SETTALKOFFR=1FOR___________________________@R,RSAY“*”FORJ=1TOI-1@R,R+JSAY“”ENDFOR@R,R+JSAY“*”FORP=1TOI-1@R,R+J+PSAY“”ENDFOR@R,R+J+PSAY“*”____________________________________ENDFORSETTALKONRETURN第9页共9页扫描二维码立即获取答案
本文标题:2001年辽宁专升本考试真题-VFP部分
链接地址:https://www.777doc.com/doc-3105366 .html