您好,欢迎访问三七文档
当前位置:首页 > 高等教育 > 大学课件 > VB程序设计教程第三版泷沛曾等著实验B答案
VBBPrivateSubCommand1_Click()Dimf!,c!f=Val(Text1)c=5/9*(f-32)Text2=Format(c,0.00)EndSubPrivateSubCommand2_Click()Dimc!,f!c=Val(Text2)f=9/5*c+32Text1=Format(f,0.00)EndSubPrivateSubCommand1_Click()Dimr!,s!r=Val(Text1)s=3.14*r^2Label2=Format(s,0.00)EndSubPrivateSubCommand2_Click()Dimr!,d!r=Val(Text1)d=2*r*3.14Label3=Format(d,0.00)EndSubPrivateSubText1_lostfocus()IfNotIsNumeric(Text1)ThenText1=MsgBox()Text1.SetFocusEndIfEndSubPrivateSubCommand1_Click()Text1.Text=UCase(Text1)Label1=Len(Text1)EndSubPrivateSubText1_lostfocus()IfIsNumeric(Text1)ThenText1=MsgBox()Text1.SetFocusEndIfEndSubPrivateSubForm_Click()RandomizeDimaAsInteger,bAsInteger,cAsInteger,dAsIntegerd=Int(Rnd*900+100)Print&da=d\100b=(d/10)Mod10c=dMod10Print&c&b&aEndSub6PrivateSubForm_click()label1=left(text1,3)label2=mid(text1,4,4)label3=right(text1,3)endsub8PrivateSubForm_click()Dima!,b!,c!,d!,e!a=Val(InputBox())b=a^2c=Sqr(a)d=a^3e=a^(1/3)Print;Format(b,0.000);;Format(c,0.000);;Format(d,0.000);;Format(e,0.000)EndSub
本文标题:VB程序设计教程第三版泷沛曾等著实验B答案
链接地址:https://www.777doc.com/doc-8695497 .html