2.3.VB6.FRM-VBP7.VB6.EXE8.MSDN1-910.PrivateSubForm_Load()Command1.Left=Form1.ScaleWidth/2-Command1.Width/2Command1.Top=Form1.ScaleHeight/2-Command1.Height/2EndSub11C:\ProgramFiles\MicrosoftVisualStudio\Common\GraphicsVB1.(1)Double(2)(3)Double(4)Double(5)(6)Integer(7)String(8)String(9)Date(10)Double(11)(12)Integer()(13)8(14)Integer(15)Boolean(16)(17)g(18)SingleDoubleSingle2.(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)P.41-421-2553.VB(1)Abs(x+y)+z^5(2)(1+x*y)^6(3)(10*x+Sqr(3*y))/(x*y)(4)(-b+Sqr(b^2-4*a*c))/(2*a)(5)1/(1/r1+1/r2+1/r3)(6)Sin(45*3.14159/180)+(Exp(10)+Log(10))/Sqr(x+y+1)4.(1)Chr(Int(Rnd*(Asc(L)-Asc(C)+1)+Asc(C)))(2)[100,200]Int(Rnd*101)+100(3)(x,y)x0Andy0Orx0Andy0x*y0(4)x57xMod5=0OrInt(x/7)=x/7(5)xx\10+(xMod10)*10(6)Round(x,2)(7)CCC=AAndC=ZOrC=aAndCzUCase(C)=AAndUCase(C)=ZLCase(C)=aAndLCase(C)=z(8)S56Mid(S,5,6)(9)10x2010=xAndx20(10)xyzxzOryz(11)xyzxzAndyz5.(1)188(2)200100100+100100+100200200&100200100(3)68.56(4)876554+(5)2000-2-29(6)66Shelli=Shell(mspaint.exe,1)'i=Shell(C:\ProgramFiles\MicrosoftOffice\OFFICE11\winword.exe,1)'WordWindows8.13582.110xVB10x=Sin(x)+yx2Sqr3404.[]RoundFormatRound(x,2)Format(x,0.00)Roundz=Round(x,2)+Round(y,2)Format61=210x2010xAndx2071DimcAsStringc=InputBox(c=)IfMid(c,3,1)=CThenMsgBoxYesElseMsgBoxNoEndIf2#IfDimxAsSingle,yAsSinglex=Val(InputBox(x=))Ifx20Theny=x^2+3*x+2ElseIfx=10Theny=Sqr(3*x)-2ElseIfx0Theny=1/x+Abs(x)EndIfPrinty=;y#SelectCaseDimxAsSingle,yAsSinglex=Val(InputBox(x=))SelectCasexCaseIs20y=x^2+3*x+2CaseIs=10y=Sqr(3*x)-2CaseIs0y=1/x+Abs(x)EndSelectPrinty=;y3#IfDimxAsSingle,yAsSingle,zAsSingle,MaxAsSinglex=Val(InputBox(x=))y=Val(InputBox(y=))z=Val(InputBox(z=))Max=xIfyMaxThenMax=yIfzMaxThenMax=zPrintMax=;Max#IIFx=Val(InputBox(x=))y=Val(InputBox(y=))z=Val(InputBox(z=))Max=IIf(xy,x,y)Max=IIf(zMax,z,Max)PrintMax=;Max9.1621930410.4045012901302j147104j13k6423k0404504*3=1211.ExitForDoWhile12.1DimiAsInteger,sAsIntegerFori=1To10s=s+(i+1)*(2*i+1)NextiPrints=;s2DimiAsInteger,n3AsInteger,n7AsIntegerFori=1To100IfiMod3=0Thenn3=n3+1IfInt(i/7)=i/7Thenn7=n7+1NextiPrint1-1003;n3;Print1-1007;n7;3Dims1AsString,s2AsString,iAsIntegers1=InputBox(InputString)s2=Fori=1ToLen(s1)s2=Mid(s1,i,1)+s2NextiPrint;s1Print;s2Fori=Len(s1)To1Step-1s2=s2+Mid(s1,i,1)Nexti13.10100[50100]20DimxAsInteger,sumAsInteger,averAsSingleDimn%,i%,max%,min%Randomizemax=50:min=100:n=20Fori=1Tonx=Int(Rnd*51+50)List1.AddItemxsum=sum+xIfxmaxThenmax=xIfxminThenmin=xNextiaver=sum/nPrint;max,;min,;aver1.OptionBase1219920-113VB40-10-10-2125670-20-312834aSingle-12034416Fori=-1To2Forj=0To3Printa(i,j);NextjPrintNextiFori=LBound(a,1)ToUBound(a,1)Forj=LBound(a,2)ToUBound(a,2)PrintTab(j*8);a(i,j);NextjPrintNexti6Dima(1To20)AsStringPrivateSubCommand1_Click()'(1)DimiAsInteger,jAsInteger,nAsInteger,cAsString*1RandomizeFori=1To20a(i)='in=Int(Rnd*10+1)'[1,10]Forj=1Ton'a(i)nc=Chr(Int(Rnd*26+97))'97aASCIIa(i)=a(i)+cNextjNextiEndSubPrivateSubCommand2_Click()'(2)DimiAsIntegerFori=1To20PrintTab(((i-1)Mod5)*11);a(i);IfiMod5=0ThenPrintNextiEndSubPrivateSubCommand3_Click()'(3)DimiAsInteger,imaxAsIntegerimax=1Fori=2To20IfLen(a(i))Len(a(imax))Thenimax=iEndIfNextiPrint;a(imax)EndSub789126-831Sub23ByVal441sum32csum31suma+b412sumSqr(c)srq(a)52csum51FunctionFSqr1(aAsSingle)AsSingleDimx0AsSingle,xAsSinglex=aDox0=xx=(x0+a/x0)/2LoopWhileAbs(x-x0)0.00001FSqr1=xEndFunctionPrivateSubCommand1_Click()Dimx!,y!x=Val(InputBox(x=))Ifx=0Theny=FSqr1(x)PrintyEndIfEndSub2SubFSqr2(aAsSingle,xAsSingle)Dimx0AsSinglex=aDox0=xx=(x0+a/x0)/2LoopWhileAbs(x-x0)0.00001EndSubPrivateSubCommand2_Click()Dimx!,y!x=Val(InputBox(x=))Ifx=0ThenCallFSqr2(x,y)PrintyEndIfEndSub3[]1-91012-1411CtrlF3PrivateSubText1_KeyDown(KeyCodeAsInteger,ShiftAsInteger)IfShift=2AndKeyCode=114ThenMsgBoxHAHAEndSub126793Open1OpenSeqnew.datForOutputAs#1'OpenSeqnew.datForAppendAs#1'2OpenSeqold.datForInputAs#23OpenSeqappend.datForAppendAsFreeFile4Text.datstrTestDimstrTestAsStringOpenText.datForInputAs#2DoWhileNotEOF(2)strTest=strTest+Input(1,#2)Loop8F1.txt'21DimstrTempAsString*1Opend:\F1.txtForAppendAs#1Opend:\F2.txtForInputAs#2DoWhileNotEOF(2)strTemp=Input(1,#2)Print#1,strTemp;'LoopClose'21DimstrTempAsString'Opend:\F1.txtForAppendAs#1Opend:\F2.txtForInputAs#2strTemp=DoWhileNotEOF(2)strTemp=strTemp+Input(1,#2)LoopPrint#1,strTempClose