急急急!VFP题目求高手速度解答谢谢

急急急!VFP题目求高手速度解答谢谢,第1张

一1、go bott 2、not bof() 3、skip -1 4、use

二1、go 3 2、判知尺INSER BEFORE BLANK

三1、recno() 2、9

四1、i=1 to 3 2、if PSW==“MANAGER” 3、exit 4、if

五1、y%4=0 and y%100<掘高>0 2、else

六1、猛型s=s+I 2、i=i+2

程序1

clear

?"1992-2020年中间的闰年有:"

for year=1992 to 2020

if year%4==0 and year%100!=0 or year%400==0

?year

endif

endfor

程序2

clear

s=0

for i=100 to 999

if i%11=0

if i%10=8 or i/10%10=8 or i/100=8

?i

s=s+1

endif

endif

endfor

?"三位数中总亏信共有销誉轮",s,"个能被11整除同时又含有8的数字"

程序3

clear

a="Long long ago,there was a war between the birds and the beats. No one knows what they fought about.The bat did not know whose side he should take. He thought and thought, "

c="then decided he must try to be on the side of the winners.So he watched from far away. After a while, it seemed that the birds were going to win.He flew over to join them"

b=""

i=1

for j=1 to len(a)

if substr(a,j,1)!=" "

b=b+substr(a,j,1)

endif

endfor

for j=1 to len(c)

if substr(c,j,1)!=" "

b=b+substr(c,j,1)

endif

endfor

?b

程序4

input "虚圆请输入数字:" to n

P=2*N-1

FOR I=1 TO P

IF I<=N

?SPACE(N-I+1)

FOR J=1 TO 2*I-1

??"*"

ENDFOR

ELSE

?SPACE(I-N+1)

FOR K=1 TO 2*(2*N-I)-1

??"*"

ENDFOR

ENDIF

ENDFOR

*建立程序:modify command <程序名>

clear

close all

*(1)计算每条记录的总分

use 学生表

replace all 总分 with 数学+语迹源文+英语+数据库

*(2)将总分大于等于360分的女同学的总分提高10%

replace all 总分 with 总分*1.1 for 总分>=360

*(3)将总分大于等于320分的记录,其奖学金评定为800元

replace all 奖学金 with 800 for 总分>=320

*求总分字段最大值,最小值

go top

a=总分

min=1000

max=0

do while ! eof()

b=总分

if a>b

max=a

if b<min

min=b

endif

else

max=b

if a<min

min=a

endif

endif

skip

enddo

*(4)将总分最高的记录州衡其奖册州做学金增加500元,并显示该记录

replace 奖学金 with 奖学金+500 for 总分=max

display

*(5)将总分最低的记录作逻辑删除,并显示该记录

locate for 总分=min(总分)

delete

display

use


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12568956.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-26
下一篇 2023-05-26

发表评论

登录后才能评论

评论列表(0条)

保存