《沈阳农业大学vf个程序及答案》由会员分享,可在线阅读,更多相关《沈阳农业大学vf个程序及答案(5页珍藏版)》请在金锄头文库上搜索。
1、1s=0for i=3 to 5 i=i+2 s=s+inext?s程序程序1程序程序2c=a=沈阳农大沈阳农大b=程序设计程序设计for j=1 to 2 c=c+left(a,2)+right(b,2)next?c程序程序3n=3k=1 for i=1 to n k=k*i next?k2store 0 to a,bdo while a30 a=(a+1)*(a+2) b=b+1enddo?b程序程序4程序程序5y=0do while y=10 y=y+1 if y/4=int(y/4) ?y endifenddo程序程序6x=int(rand( )+5)do case case x=3
2、? 大大 case x=4 ?小小 case x=5 ?多多 otherwise ?“少少” endcase3x=0y=1do while x1 exit endif a=a+1 b=b+a*(a+1)enddo?b程序程序9cleara=-5input 输入输入c的值的值 to cdo case case a=-5 b=a+1 case a=0 b=a+2 otherwise b=a+3endcase ?b4dime aa(4)s=0for n=1 to 4 aa(n)=nendfor for i=1 to 4 s=s+aa(i)endfor?s程序程序10答案(1).5 (2).沈计沈计 (3).6(4).3 (5).4 8 (6).多(7) .7 (8). 9 (9).-4(10).10