vb课后题答案(1-8章).docVIP

  • 15
  • 0
  • 约5.61千字
  • 约 7页
  • 2017-05-12 发布于河南
  • 举报
vb课后题答案(1-8章)

第一章 选择 判断 1-5 6-7 1-5 6-10 CDCAB DB √×√√× ×√√√× 第二章 选择 1-5 6-10 BDADC CDDBC 填空 1、“”、# 2、0、空串 3、+、、 4、date、time 5、Mod 6、[10,78] 7、const 8、“Shanghai” 9、”VVV” 10、窗体或标准模块、option explicit 表达式 1、(-b+sqr(b^2-4*a*c))/(2*a) 2、cos(31*3.14/180)^2+5*exp(3) 3、(x+y+z)/sqr(x^3+y^3+z^3) 4、8*exp(x)*log(10) 5、2*sin((x+y)/2)*cos((x-y)/2) 6、(x^2+y^2)/(2*a^2) 7、x^(1/3)*y^(1/4) 8、(3+a)^2/(2*c+4*d) 判断 1-5 6-10 11-15 √×√×× ×√√×× ×√×√× 表达式的值 1、30 2、0 3、14 4、 9 5、 11 6、 5 7、 1 8、 “65 VB” 第三章 选择 1-5 6-10 11-14 AABCB CDCCB ADDC 填空 1、autoredraw 2、cancel 3、autosize、wordwrap 4、2 3 2 3 3 1 5、Rem 或 单引号、冒号、下划线 6、locked、enabled 7、selstart 8、sellength 编程 1、Sub Text1_change() Dim shu# Shu=text1 Text2=-shu Text3=shu^2 Text4=sqr(abs(shu)) Text5=shu^3 Text6=shu^(1/3) 2、Command1_click() Dim x,y,t X=text1 Y=text2 T=x X=y Y=t Text1=x Text2=y 3、Dim a%, b%, c%, x1!, x2!, delta a = Text1: b = Text2: c = Text3 delta = b ^ 2 - 4 * a * c If delta = 0 Then x1 = (-b + Sqr(delta)) / (2 * a) x2 = (-b - Sqr(delta)) / (2 * a) text4 =Round(x1,1) text5 =Round(x2, 1) End If 第四章 选择 1-5 6-10 BBBAC ACCAB 填空 1、 y(2)=4 y(-13)=2.75 y(8)=256 y(-2)=5.5 y(35)=35 2、 x=102 y=16 3、s=150 4、a=870 5、 3 7 6 10 8 12 11 15 13 17 14 18 6、256 7、 125 150 175 3 编程 1、 Dim x!,y! X=text1 If x=0 then Text2=sqr(x) Else Msgbox “该数不能开平方” End if 2、 dim n% N=text1 If n mod 5=0 and n mod 7=0 then Label1.caption= n ”能同时被5和7整除” Else Label1.caption= n ”不能同时被5和7整除” End if 5、(1) Dim n%,i%,s# S=0 N=text1 For i=1 to n S=s+(-1)^(i+1)/i Next Text2=s (2) Dim n%,i%,s#,t% S=0 T=0 N=text1 For i=1 to n T=t+i S=s+t Next Text2=s (3) Dim n%,i%,s# S=0 N=text1 For i=1 to n S=s+i^2 Next Text2=s (4) Dim n%,i%,s# S=0 N=text1 For i=1 to n T=i*(i+1) S=s+(-1)^(i+1)* i*(i+1) Next Text2=s (5) Dim n%,i%,s#,t#,a S=0 A=0 T=0 N=text1 For i=1 to n A=a+i T=1/a S=s+t Next Text2=s 7、 Dim i% For i=2000 to 2100 If I mod 4 =0 and I mod 1000 or I mod 400=0 then

文档评论(0)

1亿VIP精品文档

相关文档