VB实验指导与练习题实验部分的参考答案: 实验 4 4-1: 2*pi*r
Pi*r*r 4-3: chr(64+n) 4-4: x mod 10 x \\10 mod 10 x\\100
4-5: mid(s,i,1)=Lcase(t) 实验 5 5-1: a+b+c+d
Sum/4
5-2: (4*h-f)/2 (f-2*h)/2 5-4: sec\\3600\\24
Sec mod (1& 24*3600) mod 3600 mod 60 5-5: 0.5*g*t*t+v0*t 实验 6
6-1: left(text1,text1.selstart) & text2 & right(text1, len(text1) – text1.selstart)
6-2: timer1.enabled=true Timer1.enabled=false 6-3: shape2.left=shape2.left +d *50 6-5: a & check2.caption 6-6: list1.listcount -1 6-7: 1000 List1.list(i) 6-8: text1 实验 7 7-1: n=n-3500 n-y
text1.setfocus 7-2: a=a & c 7-3: sum +j Sum=1250 7-4: m=n n=r r= m mod n
7-5: if a mod i=0 then exit for 7-6: text1
S2 & mid (s1,k,1)
S2=””
7-7: 2 n\\factor factor+1 7-8: n 7-9: sum=0 s & i & “ +” list1.clear 7-10: mid(text1, i, 1) 实验8
8-1:a(i)=a(16-i) a(16-i)=temp 8-2: a(i-2)+a(i+1)+1 Text2 & vbcrlf 8-3: picture1.print i=1 to 5
sum=sum+a(I,j) next i
sum+a(i,j)+a(i,6-i)
not ( i>1 and i<5 or j>1 and j<5 ) 8-4: text1 & str(a(i))