VB程序设计教程第三版泷沛曾等著实验c答案

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

VBCPrivateSubForm_click()Dimx!,y!x=Val(InputBox())Ifx1000Theny=xElseIfx=1000Andx2000Theny=0.9*xElseIfx=2000Andx3000Theny=0.8*xElseIfx=3000Theny=0.7*xEndIfPrint;yEndSubPrivateSubCommand1_Click()Dimt%,y%t=Val(InputBox())Ift10Theny=30ElseIft=10Andt50Theny=2.5*tElseIft=50Theny=2*tEndIfIfy=150Theny=150EndIfPrint;yEndSubPrivateSubCommand1_Click()Dimx%,y%,m%,n%m=Val(Text1.Text)n=Val(Text2.Text)If(nMod2)0ThenMsgBox(=2)text2.text=text2.setfocusesley=1/2*n-mx=2*m-1/2*nIfx0Ory0ThenMsgBox()text1.text=text1.setfocuselseLabel1=xLabel2=yendifendifEndSub6PrivateSubCommand1_Click()Dima%,b%,c%,x1%,x2%,st%a=Val(Text1.Text)b=Val(Text2.Text)c=Val(Text3.Text)st=b^2-4*a*cIfst0ThenMsgBox(del0,)ElseIfst=0Thenx1=(-b+Sqr(st))/2*ax2=(-b-Sqr(st))/2*aEndIfText4.Text=x1Text5.Text=x2EndSub

1 / 5
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功