您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 数据通信与网络 > 初二信息技术vb《程序设计》教案
11211.11.222.12.23411234VB2.123.121,,,,2,,3BASICBasicfoxprocjava,,51+53VisualBasicTurboPascalCC++Java123.8.5cm112131,,2teacher15312274A91B(10)9(100)(90)101232VisualBasic11VisualBasic2VisualBasic2.1VisualBasic2.2VB1.1VisualBasic2.1VBVisualBasic2VB3.1VisualBasicVBVBVBVBVBVisualBasicQQ1VB2211VB2VB3VB21VB231VB24121.1232.1214111.11.2VB2VB12.1VB2.22.3313.13.2415.4*1042.3*101411j=5.4*10^4kmz=2.3*10^14kmm=365*24*60*60=3153600022VB11Image2command2Form1CaptionImage1stretchTruePictureCommand1CaptionCommand2Caption3Remletj=5.4*10^4jletz=2.3*10^14zletm=31536000mRemletn=Int(z/j)nlety=Int(n/m)yRemPrintPrint;n;Print;y;End412351=2.A=B()AB3.0false(1)intBeginTime=Time()(2)N=N+1(3)a=a+b+c(4)X=(5)X=Y(6)x-1=x(7)M=1(8)1=M(9)-x=1(10)a=5b=6b=b+aa=a+b:a=_____b=_______1.2(P22)Eg:r=inputbox(r)rRemEg:remC=2*pi*r1End2VB1.123VB2.1VB23.12123VB&+1234VBr3.14163.1416r[][][]12integerlongsingledoubleBooleanstringDate3[][][]12VBx=6x=8x=x+1m=20m=m+1r=1S=3.1416*r*r[]Abs(x)XInt(x)XSqr(x)XRnd(x)[01]Val(x)Str(x)Abs(86)86Abs(-86)86Int(8.001)8Int(8.999)8Int(-8.999)-9Sqr(64)8^A^2a/(a-c)68Abs(x-y)+68Int(x/10)m,nM+nVBiphone4Ssiri,,1.let1Letp=Letq=12InputBoxInputBox[][]letn=InputBoxn3lett=text1.text1Textnlet2.1printPrint[]print2label1.caption=Text1.text=**********3loadpictureloadpictureLoadpictureapp.path&&pand.jpg,pand.jpgimage1remLetx=_______Lety=_______letLetz=_______Letp=0.3*x+0.3*y+0.4*zPrintPrintprint____________________________InputBox12341[]66Abs(x):XInt(x):XSqr(x):XRnd(x):[01]Val(x):Str(x):21R116R229R1R2/(R1+R2).3[][]R1R2341VB233235[]3R1R2RDoubleVBR1R2R1+R2R1R2R116R229R1+R2162945R1R2RDoubleVal()R1R2R1+R2(val(R1)+val(R2))PrivateSubButton1_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton1.ClickDimr1AsDoubleDimr2AsDoubleDimrAsDoubler1=TextBox1.Textr2=TextBox2.Textr=r1*r2/(r1+r2)TextBox3.Text=rEndSubPrivateSubButton2_Click(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesButton2.ClickEndEndSub67ab81VB239PrivateSubform_load()Form1.caption=EndSubPrivateSubcommand1_ClickDimaasintegerDimbasintegerDimcasintegera=inputbox(a)b=inputbox(b)printa:;a,b:;bx=a:a=b:b=xprinta:;a,b:;bprinta+bEndSubPrivateSubcommand1_ClickEndEndSub101.Val()2.3.VB23121313.13.2411102PrivateSubCommand1_Click()Remx,nDimxAsIntegerDimnAsIntegerRemRandomizen=Int(2*Rnd)1Image1.Picture=LoadPicture(app.path&&.gif)Label2.Caption=Image1.Picture=LoadPicture(app.path&&.gif)Label2.Caption=Remx=Val(Text1.Text)xnLabel3.Caption=Label3.Caption=EndSub3IfThenAElseB]EndIfIfThenA[ElseB]thenelse41Ifn=1ThenImage1.Picture=LoadPicture(.gif)Label2.Caption=ElseImage1.Picture=LoadPicture(.gif)Label2.Caption=EndIf2Ifn=xThenLabel3.Caption=ElseLabel3.Caption=EndIf10Letx=val(InputBox())Ifx/2=Int(x/2)ThenPrintElsePrintEndIfLetx=val(InputBox())Ifx/2=Int(x/2)ThenPrintElsePrint22Leta=val(InputBox(:))Letb=val(InputBox(:))IfabThenPrintaElsePrintbEndIf?IfVB===truefalsea100b20abTa=bFa=(b+20)FaATabTabTx=60Andy=70,=60Andy=70,AndAndOrNota100b20a20andb=20Fa=100orb10Ta=100andb10TA=borb10FA=bandb10FNot(a200andb20)Ta200orb=20TNot(a200orb=20)fNotandor1abababab2abca+bcanda+cbandb+ca31.2.3.1csyx2.1csyx1.vbp23._Dimaasinteger,aDimbasinteger,bForm_load()Randomize,a=int(100*rnd+1),1100command1_clickp=int(rnd*12+1),1-12pic=p&.gif,image1.picture=loadpicture(app.path&&pic),x=text1.text,bb=val(x),ifa=bthen,ablabel1.caption=,else,cc,ccendif,ifpublicsubcc(),ccifbathen,balabel1.caption=,else,label1.caption=,endif,ifendsubcommand2_click()end,4.2103OKNO1001001001For=to[step][]Next[]fori=2to6PrintI;NextiFori=6to1step-1Printi;Nextis=0Fori=1to3s=s+inextiPrints1+2+3+,,+99+100x,y,z10020x0~20y0~335x+3y+z/3=100x+y+z=100DimaAsIntegerDimbAsIntegerDimcAsIntegerFora=0To20Forb=0To33c=100-a-bIf(a+b+c=100)And(a*5+b*3+c/3=100)ThenPrinta;b;cEndIfNextbNexta025754187881181124842Dowhile[]LoopLeth=0.06Letn=0Dowhileh8844000Leth=h*2Letn=n+1LoopPrint;n;Print;h/1000;
本文标题:初二信息技术vb《程序设计》教案
链接地址:https://www.777doc.com/doc-5161679 .html