VF程序设计题库

2026/4/27 21:30:55

s=0 t=1

for i=1 to 4 t=t*i endfor s=s+t t=1

for i=1 to 7 t=t*i endfor s=s+t t=1

for i=1 to 3 t=t*i endfor s=s*t ?s return

3.1!+3!+5!+....+99!= clear s=1 t=1

for i=3 to 99 step 2 t=t*i*(i-1) s=s+t endfor

?' 1!+3!+5!+....+99!=',s return 4.3!+5!+7! s=0 t=1

for i=3 to 7 step 2 t=t*i*(i-1) s=s+t endfor

?\return

5.3!+8!+11!的和 clear s=0 t=1

for i=1 to 3 t=t*i endfor s=s+t t=1

for i=1 to 8 t=t*i endfor s=s+t t=1

for i=1 to 11 t=t*i endfor s=s+t ?s return

6.10~100之间不能被3整除的数的和 clear s=0

for m=10 to 100 if mod(m,3)!=0 ?m s=s+m ?s endif endfor return

7.10~100之间能被3整除的数 clear

for m=10 to 100 if mod(m,3)=0 ?m endif

endfor return

8.1000-1100素数和 clear m=0

for k=1000 to 1100 f=0 j=2

do while f=0 and j

m=m+k endif endfor ?m

9.编写分段函数程序 第一种方法: clear

input '请输入X数值:'to x if x>3

y=3*x-10 else

if x<-3

y=2*x+10 else y=x endif endif ?'y=',y return

第二种方法: clear

input\请输入一个数\

do case case x>3 y=3*x-10 case x<-3 y=2*x+10 otherwise y=x endcase return

10.计算1!+2!+3!+…+100! clear s=0 n=1

for i=1 to 100 n=n*i s=s+n endfor

?'1!+2!+3!+...+100!=',s return

11. 计算1+2+3+…+100 clear s=0

for i=1 to 100 s=s+i endfor

?'1+2+3+...+100=',s return

12. 输入10个数,找最大值和最小值 方法1. clear

input'请输入一个数:'to x store x to max,min for i=2 to 10

input'请输入一个数:'to x if max<=x max=x else


VF程序设计题库.doc 将本文的Word文档下载到电脑
搜索更多关于: VF程序设计题库 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219