VB³ÌÐòÉè¼ÆÏ°Ì⼯£¨¸½´ð°¸£©

VB³ÌÐòÉè¼ÆÏ°Ì⼯

¸½ ´ð °¸

°à¼¶ ѧºÅ ÐÕÃû

Ŀ ¼

VB¼ò½é ............................................................................................................................................ 1 ³ÌÐò´úÂë»ù´¡ ................................................................................................................................... 4 Ñ¡Ôñ½á¹¹³ÌÐòÉè¼Æ ........................................................................................................................... 9 Ñ­»·½á¹¹³ÌÐòÉè¼Æ ......................................................................................................................... 11 Êý×é ................................................................................................................................................ 13 ¹ý³Ì ................................................................................................................................................ 19 ³£Óÿؼþ......................................................................................................................................... 23 Îļþ ................................................................................................................................................ 27 ¸ù¾ÝÌâÄ¿ÒªÇóÍêÉƳÌÐò ................................................................................................................. 28 ¸ù¾Ý³ÌÐòдÔËÐнá¹û ..................................................................................................................... 36 ×ÛºÏÓ¦ÓÃÌâ..................................................................................................................................... 40 ´ð°¸ ............................................................................................................................................ 4051

VB¼ò½é

1¡¢ÔÚÒÔÏÂÓйضÔÏóÊôÐÔµÄÐðÊöÖУ¬²»ÕýÈ·µÄÊÇ___________¡£ A¡¢Ò»¸ö¶ÔÏóµÄÊôÐÔ¿É·ÖΪÍâ¹Û¡¢ÐÐΪÈô¸ÉÀà B¡¢²»Í¬ÊôÐÔ¿ÉÄܾßÓв»Í¬µÄÊý¾ÝÀàÐÍ

C¡¢Ò»¸ö¶ÔÏóµÄËùÓÐÊôÐÔ¶¼¿ÉÔÚÊôÐÔ´°¿ÚµÄÁбíÖнøÐÐÉèÖà D¡¢ÊôÐÔ´°¿ÚÖеÄÊôÐÔÁбí¼È¿É°´×ÖĸÅÅÐòÒ²¿É°´Àà±ðÅÅÐò

2¡¢Visual BasicÖÐ×î»ù±¾µÄ¶ÔÏóÊÇ___________£¬ËüÊÇÓ¦ÓóÌÐòµÄ»ùʯ£¬Ò²ÊÇÆäËû¿Ø¼þµÄÈÝÆ÷¡£

A¡¢Îı¾¿ò B¡¢ÃüÁî°´Å¥ C¡¢´°Ìå D¡¢±êÇ©

3¡¢ÓгÌÐò´úÂë¡°Text1.Text=\Basic\¡±£¬ÆäÖеÄText1¡¢TextºÍ¡°Visual Basic¡±·Ö±ð´ú±í___________¡£

A¡¢¶ÔÏó¡¢Öµ¡¢ÊôÐÔ B¡¢¶ÔÏó¡¢·½·¨¡¢ÊôÐÔ C¡¢¶ÔÏó¡¢ÊôÐÔ¡¢Öµ D¡¢ÊôÐÔ¡¢¶ÔÏó¡¢Öµ

4¡¢Óô°ÌåµÄ___________ÊôÐÔÀ´ÉèÖô°ÌåµÄ±êÌâ¡£ A¡¢Caption B¡¢Style C¡¢Text D¡¢Name

5¡¢´°ÌåÉÏÓÐÒ»¸öÎı¾¿ò¿Ø¼þText1£¬¼ÙÉèÒÑ´æÔÚÈý¸öÕûÐͱäÁ¿a¡¢b¡¢c£¬ÇÒ±äÁ¿aµÄֵΪ5£¬±äÁ¿bµÄֵΪ7£¬±äÁ¿cµÄֵΪ12¡£ÒÔϵÄ___________Óï¾ä¿ÉÒÔʹÎı¾¿òÄÚÏÔʾµÄÄÚÈÝΪ£º5+7=12¡£

A¡¢Text1.Text = a + b + c B¡¢Text1.Text = \

C¡¢Text1 = a & \

D¡¢Text1 = \

6¡¢Èç¹ûÔÚ´°ÌåÉÏÓÐÃüÁî°´Å¥OK£¬ÔÚ´úÂë±à¼­´°¿ÚÓÐÓëÖ®¶ÔÓ¦µÄCmd_Click£¨£©Ê¼þ£¬ÔòÃüÁî°´Å¥µÄÃû³ÆÊôÐÔºÍCaptionÊôÐÔ·Ö±ðΪ_________¡£ A¡¢OK¡¢Cmd B¡¢Cmd¡¢OK

C¡¢CmdOK¡¢OK D¡¢OK¡¢CmdOK

7¡¢´°ÌåForm1µÄÃû³ÆÊôÐÔÊÇfrm£¬ËüµÄLoadʼþ¹ý³ÌÃûΪ___________¡£ A¡¢Form_Load B¡¢Form1_Load C¡¢frm_Load

1

D¡¢Me_Load

8¡¢ÏÂÁÐÓйضÔÏóÊôÐÔµÄ˵·¨ÕýÈ·µÄÊÇ___________¡£ A¡¢¶ÔÏóËùÓеÄÊôÐÔ¶¼ÂÞÁÐÔÚÊôÐÔ´°¿ÚÁбíÖÐ B¡¢²»Í¬¶ÔÏ󲻿ÉÄÜÓÐͬÃûÊôÐÔ C¡¢²»Í¬¶ÔÏóµÄͬÃûÊôÐÔÈ¡ÖµÒ»¶¨Ïàͬ

D¡¢¶ÔÏóµÄijЩÊôÐԼȿÉÒÔÔÚÊôÐÔ´°¿ÚÖÐÉèÖã¬Ò²¿ÉÒÔÔÚ³ÌÐò´úÂëÖÐÉèÖà 9¡¢Ò»¸ö¶ÔÏó¿ÉÒÔÖ´ÐеĶ¯×÷Óë¿É±»¶ÔÏóʶ±ðµÄ¶¯×÷·Ö±ð±»³ÆΪ___________¡£ A¡¢Ê¼þ¡¢·½·¨ B¡¢·½·¨¡¢Ê¼þ C¡¢ÊôÐÔ¡¢·½·¨ D¡¢¹ý³Ì¡¢Ê¼þ

10¡¢ÏÂÁÐÓйØËã·¨µÄÐðÊöÖУ¬___________ÊDz»ÕýÈ·µÄ¡£ A¡¢Ëã·¨ÖÐÖ´ÐеIJ½Öè¿ÉÒÔÎÞÐÝÖ¹µÄÖ´ÐÐÏÂÈ¥ B¡¢Ëã·¨ÖеÄÿһ²½²Ù×÷±ØÐ뺬ÒåÃ÷È· C¡¢Ëã·¨ÖеÄÿһ²½²Ù×÷¶¼±ØÐëÊÇ¿ÉÖ´ÐÐµÄ D¡¢Ëã·¨±ØÐëÓÐÊä³ö

11¡¢¶ÔÏó¿ÉÒÔʶ±ðºÍÏìÓ¦µÄijЩÐÐΪ³ÆΪ___________¡£

A¡¢·½·¨ B¡¢¼Ì³Ð C¡¢ÊôÐÔ D¡¢Ê¼þ

12¡¢Èç¹ûÉè¼ÆʱÔÚÊôÐÔ´°¿Ú½«ÃüÁî°´Å¥µÄ___________ÊôÐÔÉèÖÃΪFalse£¬ÔòÔËÐÐʱ°´Å¥´Ó´°ÌåÉÏÏûʧ¡£

A¡¢Visible B¡¢Enabled C¡¢DisabledPicture D¡¢Default

13¡¢½«Îı¾¿òµÄ___________ÊôÐÔÉèÖÃΪTrueʱ£¬Îı¾¿ò¿ÉÒÔÊäÈë»òÏÔʾ¶àÐÐÎı¾¡£ A¡¢MultiLine B¡¢ScrollBars C¡¢Text D¡¢Enabled 14¡¢ÏÂÃæ___________¶ÔÏóÎÞCaptionÊôÐÔ¡£

A¡¢Form B¡¢CommandButton C¡¢TextBox D¡¢Label 15¡¢¾ö¶¨¿Ø¼þÉÏÎÄ×ÖµÄ×ÖÌå¡¢×ÖÐΡ¢´óС¡¢Ð§¹ûµÄÊôÐÔÊÇ___________¡£ A¡¢Text B¡¢Caption C¡¢(Ãû³Æ) D¡¢Font 16¡¢½á¹¹»¯³ÌÐòÉè¼ÆÓÐÈýÖÖ»ù±¾½á¹¹£¬²»°üÀ¨___________¡£

A¡¢Ë³Ðò½á¹¹ B¡¢Ä£¿é½á¹¹ C¡¢Ñ¡Ôñ½á¹¹ D¡¢Ñ­»·½á¹¹ 17¡¢Ò»¸ö¶ÔÏóËùÄÜ×öµÄÊÂÇé³ÆΪ¶ÔÏóµÄ___________¡£

A¡¢·½·¨ B¡¢¼Ì³Ð C¡¢ÊôÐÔ D¡¢·â×°

18¡¢Èç¹ûÉè¼ÆʱÔÚÊôÐÔ´°¿Ú½«ÃüÁî°´Å¥µÄ___________ÊôÐÔÉèÖÃΪFalse£¬ÔòÔËÐÐʱ°´Å¥²»ÄÜÏìÓ¦Óû§µÄÊó±êʼþ¡£

A¡¢Visible B¡¢Enabled C¡¢DisabledPicture D¡¢Default

19¡¢µ±±êÇ©µÄ±êÌâÄÚÈÝÌ«³¤£¬ÐèÒª¸ù¾Ý±êÌâ×Ô¶¯µ÷Õû±êÇ©µÄ´óСʱ£¬Ó¦ÉèÖñêÇ©µÄ ___________ÊôÐÔÉèÖÃΪTrue¡£

A¡¢AutoSize B¡¢WordWrap C¡¢Visible D¡¢Enabled 20¡¢ÏÂÃæ¿Ø¼þÖУ¬Ã»ÓÐ Caption ÊôÐÔµÄÊÇ___________¡£

A¡¢¸´Ñ¡¿ò B¡¢µ¥Ñ¡°´Å¥ C¡¢×éºÏ¿ò D¡¢¿ò¼Ü 21¡¢Èκοؼþ¶¼¾ßÓÐ___________ÊôÐÔ¡£

A¡¢Text B¡¢Caption C¡¢(Ãû³Æ) D¡¢ForeColor

22¡¢´°ÌåÉÏÓжà¸ö¿Ø¼þ£¬ÔÚForm_Activate£¨£©Ê¼þ¹ý³ÌÖÐÌí¼Ó___________Óï¾ä£¬¾Í¿ÉÒÔÈ·±£Ã¿´ÎÔËÐгÌÐòʱ£¬¶¼½«¹â±ê¶¨Î»ÔÚÎı¾¿òText1ÖÐ A¡¢Text1.Text=\

2

B¡¢Text1.SetFocus

C¡¢Text1.GetFocus D¡¢Text1.Visible=True

23¡¢ÈôÒÑ°ÑÒ»¸öÃüÁî°´Å¥µÄDefaultÊôÐÔÉèÖÃΪTrue£¬ÔòÏÂÃæ¿Éµ¼Ö°´Å¥µÄClickʼþ¹ý³Ì±»µ÷ÓõIJÙ×÷ÊÇ___________¡£ A¡¢ÓÃÊó±êÓÒ¼üµ¥»÷´Ë°´Å¥ B¡¢°´¼üÅÌÉϵÄEsc¼ü C¡¢°´¼üÅÌÉϵĻسµ¼ü D¡¢ÓÃÊó±êÓÒ¼üË«»÷´Ë°´Å¥

24¡¢ÈçÏÂÑ¡ÏîÖУ¬___________²»ÊÇVBÌṩµÄ³ÌÐò¿ØÖƽṹ¡£ A¡¢Ë³Ðò½á¹¹ B¡¢Ñ¡Ôñ½á¹¹ C¡¢Öظ´½á¹¹ 3

D¡¢Ê÷Ðͽṹ

³ÌÐò´úÂë»ù´¡

?b?b2?4ac2a1¡¢Êýѧ±í´ïʽ¶ÔÓ¦µÄVisual Basic±í´ïʽΪ__________¡£

A¡¢-b + Sqr(b * b - 4 * a * c) / 2 * a

B¡¢-b + Sqr(b * b - 4 * a * c) / (2 * a) C¡¢(-b + Sqr(b * b - 4 * a * c) )/ 2 * a D¡¢(-b + Sqr(b * b - 4 * a * c) )/ (2 * a)

2¡¢Visual BasicÖпÉÒÔͬʱɾ³ý×Ö·û´®Ç°µ¼ºÍβ²¿¿Õ¸ñµÄº¯ÊýÊÇ__________¡£ A¡¢Ltrim B¡¢Rtrim C¡¢Trim D¡¢Mid

3¡¢ÉèA=7£¬B=4£¬C=6£¬Ôò±í´ïʽA Mod 3 + B ^ 3 / C \\ 5µÄֵΪ__________¡£ A¡¢³ö´í B¡¢3 C¡¢2 D¡¢1

4¡¢ÔÚForm_ClickʼþÖÐÖ´ÐÐÈçÏÂÓï¾äµÄ½á¹ûÊÇ__________¡£ Print Format(1236.54, \A¡¢123456

B¡¢+123,654.0% C¡¢+123,6.54% D¡¢+123,654

5¡¢Óï¾äPrint \µÄÊä³ö½á¹ûÊÇ__________¡£ A¡¢\

B¡¢³öÏÖ´íÎóÐÅÏ¢ C¡¢5*20 D¡¢100

6¡¢´°ÌåÉÏ·ÅÖÃÁËÈý¸öÎı¾¿ò£¬ÈôÔÚText1ÖÐÊäÈë123£¬ÔÚText2ÖÐÊäÈë78£¬ÔÚ³ÌÐòÖÐÖ´ÐÐÁËÓï¾äText3 = Text1 + Text2ºó£¬ÔòÔÚText3ÖÐÏÔʾ__________¡£

A¡¢434 B¡¢12378 C¡¢Òç³ö D¡¢Óï·¨´íÎó 7¡¢±í´ïʽVal(¡°abcdfg123e1234¡±)µÄֵΪ__________¡£

A¡¢ 789 B¡¢1234 C¡¢0 D¡¢±í´ïʽ´í

8¡¢¼ÙÉè±äÁ¿BOOLÊÇÒ»¸ö²¼¶ûÐͱäÁ¿£¬ÔòÏÂÁи³ÖµÓï¾äÖУ¬ÕýÈ·µÄÊÇ__________¡£ A¡¢BOOL ='TRUE' B¡¢BOOL =.TRUE.

C¡¢BOOL =#TRUE# D¡¢BOOL = True

9¡¢º¯ÊýCint¡¢Int¡¢ Fix¶¼·µ»ØÕûÊýÖµ£¬ÒÔÏÂÄÜÕýÈ·µØÃèÊöËüÃÇ·µ»ØÕûÊýÖµ´óС¹ØϵµÄÊÇ

4

__________¡£

A¡¢CInt(-5.59)=Int(-5.59)< Fix(-5.59) B¡¢Int(-5.59)

10¡¢±í´ïʽInt(91*Rnd+20)µÄ×î´óÖµÊÇ__________¡£

A¡¢10 B¡¢90 C¡¢ 99 D¡¢110 11¡¢ÄÜÕýÈ··µ»ØÕýÕûÊýNµÄÊý¾ÝλÊýµÄÓï¾äÊÇ__________¡£

A¡¢Len(N) B¡¢Len(Str(N)) C¡¢Len(CStr(N)) D¡¢Len(Val(N)) 12¡¢ÈçÏÂËĸö·ûºÅ£¬¿ÉÒÔ×÷ΪVBºÏ·¨±äÁ¿ÃûµÄÊÇ__________¡£

A¡¢5_f B¡¢ _5flg C¡¢ User%s D¡¢ N1 13¡¢ÏÂÁбí´ïʽÖÐÔËËã½á¹ûΪTrueµÄÊÇ__________¡£ A¡¢\B¡¢Int(134.69) < CInt(134.69)

C¡¢78.9 / 35.77 <= 97.5 / 43¡¢87 And -45.4 > -4.98 D¡¢Str(32.345) = CStr(32.345)

14¡¢±í´ïʽ6.5 * 5 Mod 28 \\ 8µÄÖµÊÇ__________¡£

A¡¢0 B¡¢1 C¡¢2 D¡¢3

15¡¢ÄÜÕýÈ·ÃèÊöÌõ¼þ¡°A¡¢B֮һΪÁ㵫²»µÃͬʱΪÁ㡱µÄVBÂß¼­±í´ïʽÊÇ__________¡£ A¡¢A = 0 Or B = 0 B¡¢A * B = 0 And A + B <> 0 C¡¢A * B = 0 Or A + B <> 0 D¡¢A = 0 And B = 0

16¡¢ÈçÏÂÓï¾äÖУ¬²»ÄÜÕý³£Ö´ÐеÄÊÇ__________¡£ A¡¢Print 5£«7£½100 B¡¢Print 3245343£«23233

C¡¢Print 3423/89 D¡¢Print 32765£«3

17¡¢¼ÙÉè±äÁ¿LngΪ³¤ÕûÐαäÁ¿£¬ÏÂÃæ²»ÄÜÕý³£Ö´ÐеÄÓï¾äÊÇ__________¡£ A¡¢Lng=16384*2 B¡¢Lng=4*0.5*16384

C¡¢Lng=190^2 D¡¢Lng=32768*2

18¡¢Éèa=¡°Visual Basic¡±,ÏÂÃæʹbµÄֵΪ¡°Basic¡±µÄÓï¾äÊÇ__________¡£ A¡¢b=Left(a,8,12) B¡¢b=Mid(a,8,5)

C¡¢b= Right(a,5,5) D¡¢b=Left(a,8,5)

19¡¢ÏÂÃæËùÁÐËÄ×éÊý¾ÝÖУ¬È«²¿ÊÇÕýÈ·µÄVB³£ÊýÊÇ__________¡£ A¡¢32768 1¡¢34D2 \ &O1767 B¡¢3276 123.56 1¡¢2E-2 #True#

C¡¢&HABCE 02-03-2002 False D-3 D¡¢ABCDE #02-02-2002# E-2 #True# 20¡¢±í´ïʽInt(5*Rnd+10)µÄ×îСֵÊÇ__________¡£

5

A¡¢9 B¡¢ 10 C¡¢ 11 D¡¢12

21¡¢½«Êýѧ±í´ïʽcos2(a+b)+5e2ÊÇд³ÉVb±í´ïʽµÄÕýÈ·ÐÎʽÊÇ__________¡£ A¡¢Cos(a+b)^2+5*Exp(2) B¡¢Cos ^2(a+b) +5*Exp(2) C¡¢Cos (a+b) ^2 +5*e^2 D¡¢Cos ^2(a+b) +5*Ln(2)

22¡¢¼ÙÉè±äÁ¿mydΪÈÕÆÚʱ¼äÐͱäÁ¿£¬ÏÂÃæ²»ÄÜÕý³£Ö´ÐеÄÓï¾äÊÇ__________¡£ A¡¢myd = 12:23:30

B¡¢myd =#10/22/2010 3:30:32 PM#-1 C¡¢myd = #10/22/2010 3:30:32 PM# D¡¢myd =#10/22/2010 3:30:32 PM#+1 23¡¢Êýѧ±í´ïʽ

a?b¶ÔÓ¦µÄÕýÈ·Visual Basic±í´ïʽΪ__________¡£ a?bA¡¢a-b/a+b B¡¢a-b/(a+b) C¡¢(a-b)/a+b D¡¢(a-b)/(a+b)

24¡¢ÉèMys1,Mys2¾ùΪ×Ö·û´®ÐͱäÁ¿£¬Mys1=\ÔòÏÂÃæ¹Øϵ±í´ïʽÖнá¹ûΪTrueµÄÊÇ__________¡£

A¡¢Len(Mys1)<>2*InStr(Mys1,¡±i¡±) B¡¢Mid(Mys1,8,1)>Mys2

C¡¢Chr(98) & Right(Mys1,4)=¡±Basic¡±

D¡¢InStr(Left(Mys1,6),¡±a¡±)+60>Asc(Ucase(Mys2))

25¡¢ÉèA=7,B=4,C=6,£¬Ôò±í´ïʽA Mod3+B^3/C\\5µÄֵΪ__________¡£ A¡¢1 B¡¢2 C¡¢3 D¡¢³ö´í

26¡¢Óï¾äPrint Format(12345.6, \Ö´Ðнá¹ûÊÇ__________¡£

A¡¢12,345.6 B¡¢ +12,345.60 C¡¢ +#12,345.60 D¡¢+12,345.6 27¡¢ÒÑÖªº¯ÊýASC(¡°A¡±)µÄÖµ65,Ôòº¯ÊýASC(¡°b¡±)µÄÖµÊÇ__________¡£ A¡¢65 B¡¢98 C¡¢78 D¡¢100 28¡¢ÒÔÏÂ___________ÊÇ×Ö·û´®³£Á¿¡£

A¡¢False B¡¢\ C¡¢'def ' D¡¢# True # 29¡¢ÒÔϲ»ÄÜ×÷ΪVisual Basic±äÁ¿ÃûµÄÊÇ___________¡£

A¡¢2Fa B¡¢F2a C¡¢Fa2 D¡¢Fa_2 30¡¢ÉèÓÐÒÔ϶¨ÒåÓï¾ä£º

Dim m, n as Single, d1 as Double, d2 as string Ôò±äÁ¿mµÄÀàÐÍÊÇ___________

A¡¢µ¥¾«¶ÈÐÍ B¡¢Ë«¾«¶ÈÐÍ C¡¢×Ö·û´®ÐÍ D¡¢¿É±äÀàÐÍ 31¡¢±í´ïʽ5 * 2 Mod 25 \\ 2 ^ 2µÄÖµÊÇ___________¡£

A¡¢1 B¡¢0 C¡¢6 D¡¢4 32¡¢ÏÔʾÈçͼËùʾÊäÈë¿òµÄInputboxÓï¾äÊÇ___________¡£

6

A¡¢a = InputBox(\Ó¦ÓÃʾÀý\ÇëÊäÈë\ÕýÕûÊý\

B¡¢a = InputBox(\Ó¦ÓÃʾÀý\ÇëÊäÈë\ÕýÕûÊý\ \ C¡¢a = InputBox(\ÇëÊäÈë\ÕýÕûÊý\Ó¦ÓÃʾÀý\

D¡¢a = InputBox(\ÇëÊäÈë\ÕýÕûÊý\Ó¦ÓÃʾÀý\33¡¢ÒÔÏÂ___________ÊDz¼¶ûÐͳ£Á¿¡£

A¡¢True B¡¢\ C¡¢' True ' D¡¢# True #

34¡¢Èç¹û½«²¼¶û³£Á¿ÖµTrue¸³Öµ¸øÒ»¸öÕûÐͱäÁ¿£¬ÔòÕûÐͱäÁ¿µÄֵΪ___________¡£ A¡¢0 B¡¢-1 C¡¢True D¡¢False 35¡¢ÏÂÁÐÐðÊöÕýÈ·µÄÊÇ___________¡£

A¡¢×¢ÊÍÓï¾äÊÇÖ´ÐÐÓï¾ä£¬½ö¶Ô³ÌÐòµÄÓйØÄÚÈÝÆð×¢ÊÍ×÷Óà B¡¢´úÂëÖмÓÈë×¢ÊÍÓï¾äµÄÄ¿µÄÊÇÌá¸ß³ÌÐòµÄ¿É¶ÁÐÔ C¡¢×¢ÊÍÓï¾ä²»¿ÉÒÔ·ÅÔÚÐøÐзûµÄºóÃæ D¡¢Ö»ÄÜʹÓÃRem¹Ø¼ü×ÖÊéдעÊÍÓï¾ä 36¡¢ÏÂÃæ__________²»ÊÇ×Ö·û´®³£Á¿¡£

A¡¢\ÄãºÃ\ B¡¢\ \ C¡¢\ D¡¢#False# 37¡¢ÏÂÁзûºÅ³£Á¿µÄÉùÃ÷ÖУ¬__________ÊDz»ºÏ·¨µÄ¡£ A¡¢Const a as Single=1.1 B¡¢Const a as Integer=\

C¡¢Const a as Double=Sin(1) D¡¢Const a=\

38¡¢ÏÂÁÐÐðÊöÖв»ÕýÈ·µÄÊÇ__________¡£ A¡¢±äÁ¿ÃûµÄµÚÒ»¸ö×Ö·û±ØÐëÊÇ×Öĸ B¡¢±äÁ¿ÃûµÄ³¤¶È²»³¬¹ý255¸ö×Ö·û

C¡¢±äÁ¿Ãû¿ÉÒÔ°üº¬Ð¡Êýµã»òÕßÄÚǶµÄÀàÐÍÉùÃ÷×Ö·û D¡¢±äÁ¿Ãû²»ÄÜʹÓùؼü×Ö

39¡¢Int(100 * Rnd())²úÉúµÄËæ»úÕûÊýÇø¼äÊÇ__________¡£

A¡¢[0,99] B¡¢[1,100] C¡¢[0,100] D¡¢[1,99] 40¡¢º¯ÊýRight(\µÄÖµÊÇ__________¡£

A¡¢Beij B¡¢jing C¡¢eiji D¡¢ijin 41¡¢±í´ïʽAbs(-5) + Len(\µÄÖµÊÇ__________¡£

A¡¢5ABCDE B¡¢-5ABCDE C¡¢10 D¡¢0

42¡¢ÉèA¡¢B¡¢C±íʾÈý½ÇÐεÄÈýÌõ±ß£¬±íʾÌõ¼þ¡°ÈÎÒâÁ½±ßÖ®ºÍ´óÓÚµÚÈý±ß¡±µÄ²¼¶û±í´ïʽ¿ÉÒÔÓÃ__________±íʾ¡£

A¡¢A + B > C Or A + C > B Or B + C > A B¡¢A + B < C Or A + C < B Or B + C < A C¡¢A + B > C And A + C > B And B + C > A D¡¢A + B < C And A + C < B And B + C < A

43¡¢ÔÚÒ»¸öÓï¾äÐÐÄÚд¶àÌõÓï¾äʱ£¬Óï¾äÖ®¼äÓ¦¸ÃÓÃ__________·Ö¸ô¡£ A¡¢¶ººÅ B¡¢·ÖºÅ C¡¢¶ÙºÅ D¡¢Ã°ºÅ 44¡¢ÏÂÃæ__________ÊÇ×Ö·û´®³£Á¿¡£

A¡¢m B¡¢#01/01/99# C¡¢\ D¡¢True

45¡¢ÒªÇ¿ÖÆÏÔʽÉùÃ÷±äÁ¿£¬¿ÉÔÚ´°ÌåÄ£¿é»ò±ê׼ģ¿éµÄͨÓÃÉùÃ÷¶ÎÖмÓÈëÓï¾ä__________¡£ A¡¢Option Base 0 B¡¢Option Explicit

7

C¡¢Option Base 1 D¡¢Option compare

46¡¢²úÉú[10,37]Ö®¼äµÄËæ»úÕûÊýµÄVB±í´ïʽÊÇ__________¡£ A¡¢Int(Rnd * 27) + 10 B¡¢Int(Rnd * 28) + 10

C¡¢Int(Rnd * 27) + 11 D¡¢Int(Rnd * 28) + 11 47¡¢ÓÐÒÔ϶¨ÒåÓï¾ä£º Dim max, min As Integer

Ôò±äÁ¿maxµÄÀàÐÍÊÇ__________¡£

A¡¢¿É±äÀàÐÍ B¡¢µ¥¾«¶ÈÐÍ C¡¢ÕûÐÍ D¡¢³¤ÕûÐÍ 48¡¢º¯ÊýLeft(\µÄÖµÊÇ__________¡£

A¡¢how B¡¢are C¡¢you D¡¢how are you 49¡¢º¯ÊýMid(\µÄÖµÊÇ__________¡£

A¡¢shangh B¡¢sha C¡¢angh D¡¢hai

50¡¢¿É±íʾ¡°Á½¸ö±äÁ¿AºÍB֮һΪ0£¬µ«²»ÄÜͬʱΪ0¡±µÄ±í´ïʽÊÇ__________¡£ A¡¢A = 0 And B <> 0 B¡¢A * B = 0 And A <> B C¡¢A <> 0 And B = 0

D¡¢A <> 0 And B = 0 And A = 0 And B <> 0

51¡¢ÔÚVB´úÂë±à¼­Æ÷ÖУ¬ÓÃÀ´±íʾÐøÐеÄÊÇ__________¡£ A¡¢Ò»¸ö¿Õ¸ñ¼ÓÒ»¸öÏ»®×Ö·û( _ ) B¡¢Ò»¸öÏ»®×Ö·û( _ )

C¡¢Ö±½Ó»Ø³µ D¡¢Ò»¸ö¿Õ¸ñ¼ÓÒ»¸öÁ¬×Ö·û( - )

52¡¢Èç¹û½«²¼¶û³£Á¿ÖµFalse¸³Öµ¸øÒ»¸öÕûÐͱäÁ¿£¬ÔòÕûÐͱäÁ¿µÄֵΪ__________¡£ A¡¢0 B¡¢£­1 C¡¢True D¡¢False

8

Ñ¡Ôñ½á¹¹³ÌÐòÉè¼Æ

1¡¢ÏÂÁÐÓï¾äÕýÈ·µÄÊÇ__________¡£ A¡¢If x < 4 * y And x > y Then y = x4 B¡¢If x < 4 * y And x > y Then y = x ^ 4 C¡¢If x < 4 * y : x > y Then y = x ^ 4 D¡¢If x < 4 * y And x > y Then y = x ** 4 2¡¢·ÖÎöÏÂÁÐÓï¾ä£¬¸ø³öÖ´Ðнá¹û Private Sub Form_Click() Const pi As Single = 3.14 a% = 7

If a Mod 4 > pi Then Print \ŬÁ¦\ Else Print \ѧϰ\End Sub

Ö´Ðнá¹ûΪ___________£¬ÆäÅоöÌõ¼þµÄֵΪ__________¡£ A¡¢Å¬Á¦ TRUE B¡¢Ñ§Ï° False C¡¢Å¬Á¦ False D¡¢Ñ§Ï° TRUE

3¡¢Õë¶ÔÓï¾äIf I = 1 Then J = 1£¬ÏÂÁÐ˵·¨ÕýÈ·ÊÇ__________¡£ A¡¢I = 1ºÍJ = 1¾ùΪ¸³ÖµÓï¾ä B¡¢I = 1¡¢J = 1¾ùΪ¹Øϵ±í´ïʽ

C¡¢I = 1Ϊ¹Øϵ±í´ïʽ£¬J = 1Ϊ¸³ÖµÓï¾ä D¡¢I = 1Ϊ¸³ÖµÓï¾ä£¬J = 1Ϊ¹Øϵ±í´ïʽ

4¡¢Èç¹ûXµÄÖµ´óÓÚ»òµÈÓÚYµÄƽ·½£¬Ôò´òÓ¡¡°OK¡±£¬±íʾÕâ¸ö¹¦Äܵĵ¥ÐиñʽIfÓï¾äÊÇ___________¡£

A¡¢If x >= y ^ 2 Then Print OK B¡¢If x >= y 2 Then Print \C¡¢If x >= y ^ 2 Then Print \

D¡¢If x >= y ^ 2 Then Print \

5¡¢Óï¾äX = X + 1µÄÕýÈ·º¬ÒåÊÇ__________¡£ A¡¢±äÁ¿XµÄÖµÓëX£«1µÄÖµÏàµÈ B¡¢½«±äÁ¿XµÄÖµ´æµ½X£«1ÖÐÈ¥

C¡¢½«±äÁ¿XµÄÖµ¼Ó1ºó¸³¸ø±äÁ¿X D¡¢±äÁ¿XµÄֵΪ1

6¡¢ÒÔÏÂ__________³ÌÐò¶Î¿ÉÒÔʵÏÖX¡¢Y±äÁ¿ÖµµÄ½»»»¡£ A¡¢Y = X: X = Y B¡¢Z = X: Y = Z: X = Y C¡¢Z = X: X = Y: Y = Z D¡¢Z = X: W = Y: Y = Z: X = Y 7¡¢ÏÂÁÐÓï¾äÕýÈ·µÄÊÇ__________¡£ A¡¢If A¡ÝB Then T=A A=B B=T

9

B¡¢If A¡ÝB Then T=A ;A=B; B=T C¡¢If A>=B Then T=A A=B B=T D¡¢If A>=B Then T=A : A=B : B=T

8¡¢¹ØÓÚÓï¾äIf x = 1 Then y = 1£¬ÏÂÁÐ˵·¨ÕýÈ·µÄÊÇ__________¡£ A¡¢x = 1 ºÍ y = 1¾ùΪ¸³ÖµÓï¾ä B¡¢x = 1 ºÍ y = 1¾ùΪ¹Øϵ±í´ïʽ

C¡¢x = 1 Ϊ¹Øϵ±í´ïʽ£¬ y = 1Ϊ¸³ÖµÓï¾ä D¡¢x = 1 Ϊ¸³ÖµÓï¾ä£¬ y = 1Ϊ¹Øϵ±í´ïʽ 9¡¢ÏÂÁÐ˵·¨ÖÐÕýÈ·µÄÊÇ__________¡£

A¡¢Óï¾äText1.Text = xµÄº¬ÒåÊǽ«±äÁ¿xµÄÖµÏÔʾÓÚÎı¾¿òText1ÖÐ B¡¢Óï¾äText1.Text = xµÄº¬ÒåÊǽ«Îı¾¿òText1ÖеÄÄÚÈݸ³Öµ¸ø±äÁ¿x

C¡¢Óï¾äText1.Text = xµÄº¬ÒåÊǽ«Îı¾¿òText1ÖеÄÄÚÈÝת»»ÎªÊýÖµÐͺó¸³Öµ¸ø±äÁ¿x D¡¢ÒÔÉÏ˵·¨¶¼ÊÇ´íÎóµÄ

10¡¢ÏÂÁÐÓï¾äÕýÈ·µÄÊÇ__________¡£

A¡¢If x < 3 * y And x > y Then y = x ^ 3 B¡¢If x < 3 * y And x > y Then y = x3 C¡¢If x < 3 * y £º x > y Then y = x ^ 3 D¡¢If x < 3 * y And x > y Then y = x * * 3

11¡¢Èç¹ûXµÄֵСÓÚ»òµÈÓÚYµÄƽ·½£¬Ôò´òÓ¡¡°OK¡±£¬±íʾÕâ¸ö¹¦Äܵĵ¥ÐÐIfÓï¾äÊÇ__________¡£

A¡¢If x <= y2 Then Print \ B¡¢If x <= y ^ 2 Then Print \C¡¢If x <= y ^ 2 Then \D¡¢If x <= y ^ 2 Print \

10

Ñ­»·½á¹¹³ÌÐòÉè¼Æ

1¡¢ÔÚ³ÌÐòÖÐÓÐÓï¾äFor i = n1 To n2 Step n3£¬ÔòÔÚÑ­»·ÌåÖÐÓÐÏÂÁÐ__________Óï¾ä»áÓ°ÏìÑ­»·Ö´ÐеĴÎÊý¡£ A¡¢n1 = n1 + 1 B¡¢n2 = n2 + n3 C¡¢n3 = 2 * n3 D¡¢i=i+n3

2¡¢Ñ­»·½á¹¹For I = 1 to 15 step 2 µÄÖ´ÐдÎÊýÊÇ__________¡£

A¡¢6 B¡¢7 C¡¢8 D¡¢9 3¡¢ÏÂÁÐÑ­»·½á¹¹ÖУ¬´°ÌåÉÏ´òÓ¡³öÀ´µÄÑ­»·±äÁ¿iµÄֵΪ___________¡£ sum = 0

For i = 1 To 100 sum= sum + i Next i

Print i£»sum

A¡¢1 B¡¢2 C¡¢100 D¡¢101 4¡¢ÏÂÁÐÑ­»·½á¹¹ÖУ¬Ñ­»·Ìåx = x + kµÄÖ´ÐдÎÊýΪ___________¡£ x = 0

For k = 1 To 10 Step 2 x = x + k Next k print k£»x

A¡¢0 B¡¢1 C¡¢5 D¡¢10 5¡¢ÒÔÏÂÑ­»·Óï¾äÖÐÔÚÈκÎÇé¿ö϶¼ÖÁÉÙÖ´ÐÐÒ»´ÎÑ­»·ÌåµÄÊÇ___________¡£ A¡¢Do While <Ìõ¼þ> B¡¢While <Ìõ¼þ> Ñ­»·Ìå Ñ­»·Ìå Loop Wend

C¡¢Do D¡¢Do Until <Ìõ¼þ> Ñ­»·Ìå Ñ­»·Ìå Loop Until <Ìõ¼þ> Loop

6¡¢ÔÚ´°ÌåÉÏ»­Ò»¸öÃû³ÆΪCommand1µÄÃüÁî°´Å¥£¬²¢±àдÒÔϳÌÐò£º Private Sub Command1_Click(£© Dim n% ,b ,t

t = 1 : b = 1 : n = 2 Do

b = b * n t = t + b n = n +1 Loop Until n>9 Print t

11

End Sub

´Ë³ÌÐò¼ÆËã²¢Êä³öÒ»¸ö±í´ïʽµÄÖµ£¬¸Ã±í´ïʽÊÇ___________¡£ A¡¢9£¡ B¡¢10£¡

C¡¢1£¡+2£¡+?+9£¡ D¡¢1£¡+2£¡+?+10£¡

12

Êý×é

1¡¢Ä³¹ý³ÌµÄ˵Ã÷Óï¾äÖУ¬ÕýÈ·µÄÊý×é˵Ã÷Óï¾äÊÇ__________¡£ Const n As Integer = 3 Dim L As Integer

¢Ù Dim x(L) As Integer ¢Ú Dim a(k) As Integer Const k As Integer = 3 ¢Û Dim b(n) As Integer

¢Ü Dim y(2000 to 2008) as Integer A¡¢¢Ù¢Ú¢Ü B¡¢¢Ù¢Û¢Ü C¡¢¢Û¢Ü D¡¢¢Ú¢Û

2¡¢ÏÂÁÐÓйØÊý×éµÄ˵·¨ÖУ¬´íÎóµÄÊÇ__________¡£ A¡¢Êý×é±ØÐëÏȶ¨ÒåºóʹÓÃ

B¡¢Êý×éÐβοÉÒÔÊǶ¨³¤×Ö·û´®ÀàÐÍ

C¡¢EraseÓï¾äµÄ×÷ÓÃÊǶÔÒѶ¨ÒåÊý×éµÄÖµÖØгõʼ»¯ D¡¢¶¨ÒåÊý×éʱ£¬Êý×éά½çÖµ¿ÉÒÔ²»ÊÇÕûÊý

3¡¢ÔÚ´°ÌåµÄͨÓÃÉùÃ÷´¦ÓÐÓï¾ä¡°Dim a() As Single¡±£¬ÒÔÏÂÔÚijʼþ¹ý³ÌÖÐÖض¨Òå´ËÊý×éµÄÒ»×éÕýÈ·Óï¾äÊÇ__________¡£ A¡¢ReDim a(3, 3)

ReDim a(4, 4) As Integer B¡¢ReDim a(3, 3)

ReDim preserve a(4, 4) C¡¢ReDim a(3)

ReDim a(3, 3) as Integer D¡¢ReDim a(3, 3)

ReDim preserve a(3, 4)

4¡¢ÒÔÏÂ___________ÊÇVisual BasicºÏ·¨µÄÊý×éÔªËرíʾ·¨¡£

A¡¢x_9 B¡¢x[9] C¡¢x{9} D¡¢x(9) 5¡¢ÏÂÃæµÄÊý×éÉùÃ÷Óï¾äÖÐ___________ÊÇÕýÈ·µÄ¡£

A¡¢Dim a[3,4] As Integer B¡¢Dim a(3, 4) As Integer C¡¢Dim a(3;4) As Integer D¡¢Dim a(3:4) As Integer 6¡¢ÉèÓÐÊý×éÉùÃ÷Óï¾ä£º Option Base 1

Dim b(-1 To 1, 2 ) As Integer

ÔòÊý×ébÖй²ÓÐ___________¸öÔªËØ¡£

A¡¢2 B¡¢4 C¡¢6 D¡¢9

7¡¢Ê¹ÓÃÓï¾äDim a(1 To 15) As StringÉùÃ÷Êý×éaÖ®ºó£¬ÒÔÏÂ˵·¨ÕýÈ·µÄÊÇ___________¡£ A¡¢AÊý×éÖеÄËùÓÐÔªËØֵΪ0

13

B¡¢AÊý×éÖеÄËùÓÐÔªËØÖµ²»È·¶¨ C¡¢AÊý×éÖеÄËùÓÐÔªËØֵΪ¿Õ´® D¡¢AÊý×éÖеÄËùÓÐÔªËØֵΪTrue

8¡¢¹ØÓÚReDimÓï¾ä£¬ÒÔÏÂ˵·¨´íÎóµÄÊÇ___________¡£ A¡¢ReDimÓï¾ä¿ÉÒԸıäÊý×éµÄάÊý

B¡¢ReDimÓï¾ä¼È¿ÉÒÔÔÚ¹ý³ÌÖÐʹÓã¬Ò²¿ÉÒÔÔÚÄ£¿éµÄͨÓÃÉùÃ÷´¦Ê¹Óà C¡¢ReDimÓï¾ä¿É±£Áô¶¯Ì¬Êý×éÖÐÔ­ÓеÄÄÚÈÝ

D¡¢ÔÚReDimÓï¾äÖУ¬¿ÉʹÓñäÁ¿ËµÃ÷¶¯Ì¬Êý×éµÄ´óС 9¡¢ÉèÓÐÊý×éÉùÃ÷Óï¾ä£º Option Base 1

Dim a(-1 To 2£¬8) As Long

Ôò£¬º¯ÊýLBound(a£¬2) µÄֵΪ___________¡£

A¡¢0 B¡¢£­1 C¡¢1 D¡¢2 10¡¢ÏÂÁйØÓڿؼþÊý×éµÄ˵·¨´íÎóµÄÊÇ___________¡£

A¡¢¿Ø¼þÊý×éÓÉÒ»×é¾ßÓй²Í¬Ãû³ÆºÍÏàͬÀàÐ͵Ŀؼþ×é³É B¡¢¿Ø¼þÊý×éÖеÄÿһ¸ö¿Ø¼þ¹²ÏíͬÑùµÄʼþ¹ý³Ì

C¡¢¿Ø¼þÊý×éÖеÄÿ¸öÔªËصÄϱêÓɿؼþµÄIndexÊôÐÔÖ¸¶¨ D¡¢Í¬Ò»¿Ø¼þÊý×éÖеÄÔªËØÖ»ÄÜÓÐÏàͬµÄÊôÐÔÖµ

11¡¢ÉèÓÐÃüÁî°´Å¥Command1µ¥»÷ʼþ¹ý³Ì£¬´úÂëÈçÏ£º Private Sub Command1_Click(£© Dim a(30£©As Integer For i=1 To 30

a(i£©=Int(Rnd*100£© Next

For Each arrItem In a

If arrItem Mod 7=0 Then Print arrItem£» If arrItem>90 Then Exit For Next End Sub

¶ÔÓÚ¸Ãʼþ¹ý³Ì£¬ÒÔÏÂÐðÊöÖдíÎóµÄÊÇ___________¡£ A¡¢aÊý×éÖеÄÊý¾ÝÊÇ30¸ö100ÒÔÄÚµÄÕûÊý B¡¢Óï¾äFor Each arrItem In aÓÐÓï·¨´íÎó

C¡¢If arrItem Mod 7=0??Óï¾äµÄ¹¦ÄÜÊÇÊä³öÊý×éÖÐÄܹ»±»7Õû³ýµÄÊý

D¡¢If arrItem>90??Óï¾äµÄ×÷ÓÃÊǵ±Êý×éÔªËصÄÖµ´óÓÚ90ʱÍ˳öForÑ­»· 12¡¢ÓÐÒÔϳÌÐò£º Option Base 1

Dim a(£© As Integer

Private Sub Form_Click(£© Dim i As Integer, j As Integer ReDim a(3, 2£© For i = 1 To 3

For j = 1 To 2

a(i, j£© = i * 2 + j Next j

14

Next i

ReDim Preserve a(3, 4£© For j = 3 To 4

a(3, j£© = j + 9 Next j

Print a(3, 2£©; a(3, 4£© End Sub

³ÌÐòÔËÐк󣬵¥»÷´°Ì壬Êä³ö½á¹ûÊÇ___________¡£ A¡¢ 8 13 B¡¢ 0 13 C¡¢ 7 12 D¡¢ 0 0 13¡¢ÏÂÃæµÄÊý×éÉùÃ÷Óï¾äÖÐ__________ÊÇÕýÈ·µÄ¡£ A¡¢Dim a[3,4] as Integer B¡¢Dim a(3, 4) As Integer C¡¢Dim a[3;4] as Integer D¡¢Dim a(3:4) as Integer 14¡¢ÉèÓÐÊý×éÉùÃ÷Óï¾ä£º Option Base 1

Dim A(2) As Integer

ÔòÊý×éAµÄϽçΪ__________¡£

A¡¢0 B¡¢1 C¡¢2 D¡¢²»ÄÜÈ·¶¨ 15¡¢ÒÔÏÂ˵·¨²»ÕýÈ·µÄÊÇ__________¡£

A¡¢Ê¹ÓÃReDimÓï¾ä¿ÉÒԸı䶯̬Êý×éµÄάÊý

B¡¢ÈôÓÃDimÓï¾ä¶¨ÒåÁ˶¯Ì¬Êý×éµÄÀàÐÍ£¬¿ÉÒÔÓÃReDim¸ü¸ÄΪÆäËüÀàÐÍ C¡¢Ê¹ÓÃReDimÓï¾ä¿ÉÒԸı䶯̬Êý×éÿһάµÄ´óС

D¡¢Ê¹ÓÃReDimÓï¾ä¿ÉÒÔ¶Ô¶¯Ì¬Êý×éÖеÄËùÓÐÔªËؽøÐгõʼ»¯ 16¡¢ÓÃArrayº¯Êý¸øijX¸³ÖµÊ±£¬X±ØÐëÊÇ__________¡£ A¡¢ÒѾ­ÉùÃ÷µÄ¾²Ì¬Êý×é B¡¢ÒѾ­ÉùÃ÷µÄ¶¯Ì¬Êý×é C¡¢VariantÀàÐ͵ıäÁ¿ D¡¢ÕûÐͱäÁ¿

17¡¢ÉèÓÐÊý×éÉùÃ÷Óï¾ä£º Option Base 1

Dim A(-1 To 2) As Long

Ôòº¯ÊýUBound(A)µÄֵΪ__________¡£

A¡¢0 B¡¢£­1 C¡¢1 D¡¢2

18¡¢ÉèÓø´ÖÆ¡¢Õ³ÌùµÄ·½·¨½¨Á¢ÁËÒ»¸öÃüÁî°´Å¥Êý×éCommand1£¬ÒÔ϶ԸÃÊý×éµÄ˵·¨ÖдíÎóµÄÊÇ__________¡£

A¡¢ÃüÁî°´Å¥µÄCaptionÊôÐÔ¶¼ÊÇCommand1

B¡¢ÔÚ´úÂëÖзÃÎÊÈÎÒâÒ»¸öÃüÁî°´Å¥Ö»ÐèʹÓÃÃû³ÆCommand1 C¡¢ÃüÁî°´Å¥µÄ´óС¶¼Ïàͬ

D¡¢ÃüÁî°´Å¥¹²ÏíÏàͬµÄʼþ¹ý³Ì

19¡¢ÔÚ´°ÌåÉÏ»­ 1 ¸öÃüÁî°´Å¥£¬²¢±àдÈçÏÂʼþ¹ý³Ì£º Private Sub Commandl Click() Dim a(3,3) For m=1 To 3

15

For n=1 To 3

If n=m Or n=4-m Then a(m,n)=m+n Else

a(m,n)=0 End If

Print a(m,n); Next n Print Next m End Sub

ÔËÐгÌÐò£¬µ¥»÷ÃüÁî°´Å¥£¬´°ÌåÉÏÏÔʾµÄÄÚÈÝΪ__________¡£

200204230200040040340045 A¡¢006 B¡¢406 C¡¢006 D¡¢056

20¡¢ÏÂÁгÌÐò¶ÎµÄÖ´Ðнá¹ûΪ__________¡£ Dim A(3) For i = 1 To 3 A(i) = i * i Next i

Print A(i - 1)

A¡¢16 B¡¢9 C¡¢4 D¡¢1 21¡¢ÒÔÏÂ__________ÊÇVBÖкϷ¨µÄÊý×éÔªËرíʾ·¨¡£

A¡¢X9 B¡¢X[9] C¡¢X{9} D¡¢X(9) 22¡¢ÉèÓÐÊý×éÉùÃ÷Óï¾ä£º Option Base 1

Dim A(-1 to 2) As Integer

ÔòÊý×éAÖй²ÓÐ__________¸öÔªËØ¡£

A¡¢2 B¡¢3 C¡¢4 D¡¢²»ÄÜÈ·¶¨ 23¡¢Ê¹ÓÃÓï¾äDim A(1 To 15) As IntegerÉùÃ÷Êý×éAÖ®ºó£¬ÏÂÃæ˵·¨ÖÐÕýÈ·µÄÊÇ__________¡£ A¡¢Êý×éÖÐËùÓÐÔªËصÄֵΪ0 B¡¢Êý×éÖÐËùÓÐÔªËصÄÖµ²»È·¶¨ C¡¢Êý×éÖÐËùÓÐÔªËصÄֵΪ¿Õ´® D¡¢ÒÔÉÏ˵·¨¾ù²»¶Ô

24¡¢ÔÚÒÔÏÂÓï¾äÖУ¬aÖ»ÄÜÊÇ__________¡£ Dim X(15) For Each a In X Print a; Next a

A¡¢ÒѾ­ÉùÃ÷µÄ¾²Ì¬Êý×é B¡¢ÒѾ­ÉùÃ÷µÄ¶¯Ì¬Êý×é C¡¢VariantÀàÐ͵ıäÁ¿ D¡¢ÕûÐͱäÁ¿ 25¡¢ÉèÓÐÊý×éÉùÃ÷Óï¾ä£º Option Base 1

16

Dim A(2) As Long

Ôòº¯ÊýLBound(A)µÄֵΪ__________¡£

A¡¢0 B¡¢£­1 C¡¢1 D¡¢2

26¡¢ÔÚ´°ÌåÉÏÓø´ÖÆ¡¢Õ³ÌùµÄ·½·¨½¨Á¢ÁËÒ»¸öÃüÁî°´Å¥Êý×飬Êý×éÃûΪM1¡£Éè´°ÌåForm1±êÌâΪ¡°myform1¡±£¬Ë«»÷¿Ø¼þÊý×éÖеĵÚÈý¸ö°´Å¥£¬´ò¿ª´úÂë±à¼­Æ÷£¬Ð´ÈçÏ´úÂ룺 Private Sub M1_Click(Index As Integer) Form1.Caption = \End Sub

ÔËÐÐʱµ¥»÷°´Å¥Êý×éÖеĵÚÒ»¸ö°´Å¥£¬Ôò´°ÌåÏÔʾ±êÌâΪ__________¡£ A¡¢Form1 B¡¢M1 C¡¢myform1 D¡¢myform2

27¡¢ÔÚ´°ÌåÉÏ»­Ò»¸öÃûΪ Command1 µÄÃüÁî°´Å¥£¬È»ºó±àдÈçÏ´úÂ룺 Option Base 1

Private Sub Command1_Click() Dim a, s As Integer a = Array(1, 2, 3, 4) j = 1

For i = 4 To 1 Step -1 s = s + a(i) * j j = j * 10 Next i Print s End Sub

ÔËÐÐÉÏÃæµÄ³ÌÐò£¬ÆäÊä³ö½á¹ûÊÇ__________¡£

A¡¢1234 B¡¢12 C¡¢34 D¡¢4321

28¡¢´°ÌåÉÏÓÐ Command1¡¢Command2 Á½¸öÃüÁî°´Å¥¡£ÏÖ±àдÒÔϳÌÐò£º Option Base 0

Dim a( ) As Integer, m As Integer Private Sub Command1_Click( )

m=InputBox(\ÇëÊäÈëÒ»¸öÕýÕûÊý\ ReDim a(m) End Sub

Private Sub Command2_Click( )

m=InputBox(\ÇëÊäÈëÒ»¸öÕýÕûÊý\ ReDim a(m) End Sub

ÔËÐгÌÐòʱ£¬µ¥»÷ Command1 ºóÊäÈëÕûÊý 10£¬ÔÙµ¥»÷ Command2 ºóÊäÈëÕûÊý 5£¬ÔòÊý×é a ÖÐÔªËصĸöÊýÊÇ__________¡£

A¡¢5 B¡¢6 C¡¢10 D¡¢11 29¡¢ÏÂÃæÓйØÊý×éµÄ˵·¨ÖУ¬´íÎóµÄÊÇ__________¡£ A¡¢Ò»°ã¶øÑÔ£¬Êý×é±ØÐëÏȶ¨ÒåºóʹÓà B¡¢Êý×éµÄϽç±ØÐë´Ó0¿ªÊ¼

C¡¢EraseÓï¾äµÄ×÷ÓÃÊǶÔÒѶ¨Òå¹Ì¶¨´óСÊý×éµÄÖµÖØгõʼ»¯ D¡¢¶¨ÒåÊý×éʱ£¬Êý×éά½çÖµ¿ÉÒÔ²»ÊÇÕûÊý

30¡¢ÏÂÃæÓйØÊý×é´¦ÀíµÄÐðÊöÖУ¬²»ÕýÈ·µÄÊÇ__________¡£

17

A¡¢¹ý³ÌÖÐÓÃReDimÓï¾äÖض¨Ò嶯̬Êý×éʱ£¬ÆäϱêµÄÉÏϽç¿ÉΪ¸³ÁËÖµµÄ±äÁ¿ B¡¢ÔÚ¹ý³ÌÖУ¬¿ÉÒÔʹÓÃDim¡¢PrivateºÍStaticÓï¾ä¶¨ÒåÊý×é

C¡¢ÓÃReDimÓï¾äÖØж¨Ò嶯̬Êý×éʱ£¬²»µÃ¸Ä±ä¸ÃÊý×éµÄÊý¾ÝÀàÐÍ

D¡¢ÔÚReDimÓï¾äÖÐʹÓÃPreserveÓï¾äʱ£¬Ö»ÄܸıäÊý×é×îºóһάµÄάÉϽç

18

¹ý³Ì

1¡¢ÏÂÁÐ˵·¨ÖÐÕýÈ·µÄÊÇ__________¡£

A¡¢ÔÚij¸öSub¹ý³ÌÖж¨ÒåµÄ¾Ö²¿±äÁ¿¿ÉÒÔÓëÆäËüʼþ¹ý³ÌÖж¨ÒåµÄ¾Ö²¿±äÁ¿Í¬Ãû£¬µ«Æä×÷ÓÃÓòÖ»ÏÞÓڸùý³Ì

B¡¢ÔÚ´°ÌåµÄForm_Loadʼþ¹ý³ÌÖж¨ÒåµÄ±äÁ¿ÊÇÈ«¾Ö±äÁ¿ C¡¢¾Ö²¿±äÁ¿µÄ×÷ÓÃÓò¿ÉÒÔ³¬³öËù¶¨ÒåµÄ¹ý³Ì

D¡¢ÔÚµ÷Óùý³Ìʱ£¬ËùÓоֲ¿±äÁ¿±»ÏµÍ³³õʼ»¯Îª0»ò¿Õ×Ö·û´® 2¡¢ÏÂÓйزÎÊýµÄ˵·¨ÖУ¬´íÎóµÄÊÇ__________¡£ A¡¢¹ý³ÌµÄÐββ»¿ÉÒÔÊǶ¨³¤×Ö·û´®ÀàÐ͵ıäÁ¿ B¡¢°´µØÖ·´«µÝ²ÎÊý£¬ÐβκÍʵ²ÎµÄÀàÐÍ¿ÉÒÔ²»Í¬

C¡¢°´Öµ´«µÝ²ÎÊý£¬ÐβκÍʵ²ÎµÄÀàÐÍ¿ÉÒÔ²»Í¬£¬Ö»ÒªÏàÈݼ´¿É

D¡¢°´µØÖ·´«µÝ²ÎÊý£¬ÐβκÍʵ²ÎÒ²ÄÜÒÔ°´Öµ´«µÝ·½Ê½½øÐÐÐÎʵ½áºÏ 3¡¢Visual BasicÖÐϵͳĬÈϵIJÎÊý´«µÝ·½Ê½ÊÇ__________¡£ A¡¢°´Öµ B¡¢°´µØÖ· C¡¢byval D¡¢°´ÐβÎ

4¡¢ÔÚVisual BasicÖУ¬ÏÂÁйØÓÚ¹ý³ÌµÄ¶¨Òå˵·¨ÕýÈ·µÄÊÇ__________¡£ A¡¢¹ý³Ì¿ÉÒÔǶÌ׶¨ÒåÒ²¿ÉÒÔǶÌ×µ÷Óà B¡¢¹ý³Ì¿ÉÒÔǶÌ׶¨Ò嵫²»¿ÉÒÔǶÌ×µ÷Óà C¡¢¹ý³Ì²»¿ÉÒÔǶÌ׶¨Ò嵫¿ÉÒÔǶÌ×µ÷Óà D¡¢¹ý³Ì²»¿ÉÒÔǶÌ׶¨ÒåÒ²²»¿ÉÒÔǶÌ×µ÷ÓÃ

5¡¢ÈôÔÚÓ¦ÓóÌÐòÖÐÓá°Private Sub sub1(x As Integer, y As Single)¡±¶¨ÒåÁË×Ó³ÌÐòsub1£¬µ÷ÓóÌÐòÖеıäÁ¿i,j¾ùΪIntegerÐÍ£¬ÔòÕýÈ·µ÷ÓÃ×Ó³ÌÐòsub1µÄÊÇ__________¡£ ¢ÙCall sub1(i, j) ¢ÚCall sub1(3.1415, i)

¢ÛCall sub1(3.14, 234) ¢ÜCall sub1(\A¡¢¢Ù¢Û B¡¢¢Û¢Ü C¡¢¢Ù¢Ú¢Û D¡¢ÎÞ

6¡¢µ÷ÓÃÓÉÓï¾äPrivate Sub convert(y As Integer)¶¨ÒåµÄSub¹ý³Ìʱ£¬ÒÔϲ»ÊÇ°´Öµ´«µÝµÄÓï¾äÊÇ__________¡£ A¡¢Call convert((x)) B¡¢Call convert(x * 1) C¡¢convert (x) D¡¢convert x

7¡¢ÔÚVisual BasicÖУ¬È«¾Ö±äÁ¿µÄ¶¨Ò巽ʽÊÇ__________¡£ A¡¢Dim B¡¢Static C¡¢Private

19

D¡¢Public

8¡¢ÔÚ¹ý³ÌÖж¨ÒåµÄ±äÁ¿£¬ÈôÏ£ÍûÔÚÀ뿪¹ý³Ìºó£¬»¹Äܱ£´æ¹ý³ÌÖиñäÁ¿µÄÖµ£¬ÔòÓ¦¸ÃʹÓÃ__________¹Ø¼ü×ÖÔÚ¹ý³ÌÖж¨Òå¸Ã¾Ö²¿±äÁ¿¡£ A¡¢Dim B¡¢Static C¡¢Private D¡¢Public

9¡¢¿ÉÒÔÔÚ__________ÖУ¬Ê¹ÓÃPublic pubstr as String*20¶¨ÒåÒ»¸ö¶¨³¤×Ö·û´®¡£ A¡¢´°ÌåÄ£¿é B¡¢±ê׼ģ¿é C¡¢ÀàÄ£¿é D¡¢ÈýÕß¾ù¿É

10¡¢ÈôÔÚÓ¦ÓóÌÐòµÄ±ê׼ģ¿é¡¢´°ÌåÄ£¿éºÍ¹ý³ÌSub1µÄ˵Ã÷²¿·Ö£¬·Ö±ðÓá°Public G As Integer¡±¡¢¡°Private G As Integer¡±ºÍ¡°Dim G As Integer¡±Óï¾ä˵Ã÷ÁËÈý¸öͬÃû±äÁ¿G¡£Èç¹ûÔÚ¹ý³ÌSub1ÖÐʹÓø³ÖµÓï¾ä¡°G=3596¡±£¬Ôò¸ÃÓï¾äÊǸøÔÚ__________˵Ã÷²¿·Ö¶¨ÒåµÄ±äÁ¿G¸³Öµ¡£

A¡¢±ê׼ģ¿é B¡¢¹ý³ÌSub1 C¡¢´°ÌåÄ£¿é

D¡¢±ê׼ģ¿é¡¢´°ÌåÄ£¿éºÍ¹ý³ÌSub1

11¡¢¶à´°Ìå³ÌÐòÓɶà¸ö´°Ìå×é³É¡£ÔÚȱʡÇé¿öÏ£¬Visual BasicÔÚÖ´ÐÐÓ¦ÓóÌÐòʱ£¬×ÜÊÇ°Ñ__________Ö¸¶¨ÎªÆô¶¯´°Ìå¡£ A¡¢²»°üº¬ÈκοؼþµÄ´°Ìå B¡¢Éè¼ÆʱµÄµÚÒ»¸ö´°Ìå C¡¢ÃüÃûΪFrm1µÄ´°Ìå D¡¢°üº¬¿Ø¼þ×î¶àµÄ´°Ìå

12¡¢ÔÚ´°ÌåÄ£¿éµÄͨÓÃÉùÃ÷¶ÎÖÐÉùÃ÷±äÁ¿Ê±£¬²»ÄÜʹÓÃ___________¹Ø¼ü×Ö¡£ A¡¢Dim B¡¢Static C¡¢Private D¡¢Public 13¡¢ÏÂÃæµÄ¹ý³Ì¶¨ÒåÓï¾äÖкϷ¨µÄÊÇ___________¡£

A¡¢Sub proc1(Byval n()) B¡¢Sub proc1(n) As Integer C¡¢Function proc1(proc1) D¡¢Function proc1(Byval n) 14¡¢Sub¹ý³ÌÓëFunction¹ý³Ì×î¸ù±¾µÄÇø±ðÊÇ___________¡£ A¡¢Á½ÖÖ¹ý³Ì²ÎÊýµÄ´«µÝ·½Ê½²»Í¬

B¡¢Sub¹ý³Ì¿ÉÒÔʹÓÃCallÓï¾ä»òÖ±½ÓʹÓùý³ÌÃûµ÷Ó㬶øFunction²»¿ÉÒÔ C¡¢Sub¹ý³ÌµÄ¹ý³ÌÃû²»ÄÜ·µ»ØÖµ£¬¶øFunction¹ý³ÌÄÜͨ¹ý¹ý³ÌÃû·µ»ØÖµ D¡¢Function¹ý³Ì¿ÉÒÔÓвÎÊý£¬Sub¹ý³Ì²»¿ÉÒÔ

15¡¢ÔÚ¹ý³Ìµ÷ÓÃÖУ¬²ÎÊýµÄ´«µÝ¿ÉÒÔ·ÖΪ___________Á½ÖÖ·½Ê½¡£

A¡¢°´Öµ´«µÝºÍ°´µØÖ·´«µÝ B¡¢°´Öµ´«µÝºÍ°´²ÎÊý´«µÝ C¡¢°´µØÖ·´«µÝºÍ°´²ÎÊý´«µÝ D¡¢°´²ÎÊý´«µÝºÍ°´Î»Öô«µÝ

16¡¢ÒªÏëÔÚ¹ý³Ìµ÷Óú󷵻ØÁ½¸ö½á¹û£¬ÏÂÃæµÄ¹ý³Ì¶¨ÒåÓï¾äÖÐÕýÈ·µÄÊÇ_________¡£ A¡¢Sub proc1(ByVal n, ByVal m) B¡¢Sub proc1(ByVal n, m) C¡¢Sub proc1(n, ByVal m) D¡¢Sub proc1(n, m)

17¡¢Í¨Óùý³Ì¿ÉÒÔͨ¹ýÖ´ÐС°¹¤¾ß¡±²Ëµ¥ÖеÄ___________ÃüÁîÀ´½¨Á¢¡£

A¡¢Ìí¼Ó¹ý³Ì B¡¢Í¨Óùý³Ì C¡¢Ìí¼Ó´°Ìå D¡¢Ìí¼ÓÄ£¿é

20

18¡¢¼ÙÉèÒѶ¨ÒåÁËÒ»¸ö˽ÓÐͨÓùý³ÌPrivate Sub Sub1(a As Single, b As Single)£¬ÔòÏÂÁе÷ÓÃÓï¾äÖдíÎóµÄÊÇ___________¡£

A¡¢Sub1 12£¬12 B¡¢Call Sub1 x£¬y C¡¢Call Sub1(2*x£¬sin(1)) D¡¢sub1 12£¬x

19¡¢ÔÚ¹ý³Ìµ÷ÓÃÖУ¬²ÎÊýµÄ´«µÝ¿ÉÒÔ·ÖΪ°´Öµ´«µÝºÍ__________Á½ÖÖ·½Ê½¡£ A¡¢°´Êý×é´«µÝ B¡¢°´²ÎÊý´«µÝ C¡¢°´µØÖ·´«µÝ D¡¢°´Ë÷Òý´«µÝ

20¡¢ÔÚ²ÎÊý´«µÝ¹ý³ÌÖУ¬Ê¹Óùؼü×Ö__________À´ÐÞÊβÎÊý£¬¿ÉÒÔʹ֮°´Öµ´«µÝ¡£ A¡¢ByVal B¡¢ByRef C¡¢Value D¡¢Reference 21¡¢ÏÂÃæÓйرê׼ģ¿éµÄÐðÊöÖУ¬´íÎóµÄÊÇ__________¡£ A¡¢±ê׼ģ¿é²»ÍêÈ«ÓÉ´úÂë×é³É£¬»¹¿ÉÒÔÓд°Ìå

B¡¢±ê׼ģ¿éÖÐµÄ Private¹ý³Ì²»Äܱ»¹¤³ÌÖеÄÆäËûÄ£¿éµ÷Óà C¡¢±ê׼ģ¿éµÄÎļþÀ©Õ¹ÃûΪ.bas

D¡¢±ê׼ģ¿éÖеÄÈ«¾Ö±äÁ¿¿ÉÒÔ±»¹¤³ÌÖеÄÈκÎÄ£¿éÒýÓà 22¡¢ÏÂÃæµÄ¹ý³Ì¶¨ÒåÓï¾äºÏ·¨µÄÊÇ__________¡£

A¡¢Sub proc1(ByVal n()) B¡¢Sub proc1(n) As Integer C¡¢Function proc1(proc1) D¡¢Function proc1(ByVal n)

23¡¢ÔÚ¹ý³Ìµ÷ÓÃÖУ¬²ÎÊýµÄ´«µÝ¿ÉÒÔ·ÖΪ°´µØÖ·´«µÝºÍ__________Á½ÖÖ·½Ê½¡£ A¡¢°´Êý×é´«µÝ B¡¢°´²ÎÊý´«µÝ C¡¢°´Öµ´«µÝ D¡¢°´Î»Öô«µÝ

24¡¢ÔÚ²ÎÊý´«µÝ¹ý³ÌÖУ¬Ê¹Óùؼü×Ö__________À´ÐÞÊβÎÊý£¬¿ÉÒÔʹ֮°´µØÖ·´«µÝ¡£ A¡¢ByVal B¡¢ByRef C¡¢Value D¡¢Reference 25¡¢Sub¹ý³ÌÓëFunction¹ý³Ì×î¸ù±¾µÄÇø±ðÊÇ__________¡£ A¡¢Sub¹ý³Ì¿ÉÒÔʹÓÃCallÓï¾äµ÷Ó㬶øFunction¹ý³Ì²»¿ÉÒÔ B¡¢Function¹ý³Ì¿ÉÒÔÓвÎÊý£¬¶øSub¹ý³Ì²»¿ÉÒÔ C¡¢Á½ÖÖ¹ý³ÌµÄ²ÎÊý´«µÝ·½Ê½²»Í¬

D¡¢Sub¹ý³ÌµÄ¹ý³ÌÃû²»ÄÜ·µ»ØÖµ£¬¶øFunction¹ý³ÌÄÜͨ¹ý¹ý³ÌÃû·µ»ØÖµ 26¡¢±ê׼ģ¿éÖÐÓÐÈçϳÌÐò´úÂ룺 Public x As Integer£¬Y As Integer Sub var_pub() x=10 : y=20 End Sub

ÔÚ´°ÌåÉÏÓÐ 1 ¸öÃüÁî°´Å¥£¬²¢ÓÐÈçÏÂʼþ¹ý³Ì£º Private Sub Commandl_Click() Dim x As Integer Call var_pub x=x+100 y=y+100 Print x; y End Sub

ÔËÐгÌÐòºóµ¥»÷ÃüÁî°´Å¥£¬´°ÌåÉÏÏÔʾµÄÊÇ__________¡£

A¡¢100 100 B¡¢100 120 C¡¢110 100 D¡¢110 120 27¡¢ÔÚ´°ÌåÉÏÓÐ 1 ¸öÃüÁî°´Å¥£¬²¢ÓÐÈçÏÂʼþ¹ý³Ì£º Sub S() X = 1 Y = 2

21

Z = X + Y Print X, Y, Z End Sub

Private Sub Command1_Click() X = 2 Y = 3 Z = X + Y Call S

Print X, Y, Z End Sub

ÔËÐгÌÐòºóµ¥»÷ÃüÁî°´Å¥£¬´°ÌåÉÏÏÔʾµÄµÚ¶þÐÐÊÇ__________¡£ A¡¢1 2 3 B¡¢2 3 5 C¡¢2 3 3 D¡¢1 2 5

22

³£Óÿؼþ

1¡¢ÏÂÁÐ__________ÊôÐÔÊÇÿ¸ö¿Ø¼þ¶¼¾ßÓеġ£ A¡¢Name B¡¢Caption C¡¢Font D¡¢Interval

2¡¢µ¥Ñ¡°´Å¥ÓÃÓÚÒ»×黥³âµÄÑ¡ÏîÖУ¬ÈôÒ»¸öÓ¦ÓóÌÐòÖаüº¬¶à×黥³âÌõ¼þ£¬¿ÉʹÓÃ__________¿Ø¼þ¶Ôµ¥Ñ¡°´Å¥½øÐзÖ×é¡£ A¡¢¿ò¼Ü¿Ø¼þ»òͼÏñ¿Ø¼þ B¡¢×éºÏ¿ò»òͼÏñ¿Ø¼þ C¡¢×éºÏ¿ò»òͼƬ¿ò D¡¢¿ò¼Ü¿Ø¼þ»òͼƬ¿ò

3¡¢ÒÔÏÂËùÁеÄ8¸ö¿Ø¼þÖУ¬¾ßÓÐCaptionÊôÐÔµÄÓÐ__________¸ö¡£ CheckBox£¨¸´Ñ¡¿ò£©¡¢ComboBox£¨×éºÏ¿ò£©¡¢HscrollBar£¨Ë®Æ½¹ö¶¯Ìõ£©¡¢DirListBox£¨Îļþ¼ÐÁбí¿ò£©¡¢Image£¨Í¼Ïñ¿ò£©¡¢Frame£¨¿ò¼Ü£©¡¢Label£¨±êÇ©£©¡¢Line£¨ÏßÌõ£© A¡¢5 B¡¢4 C¡¢3 D¡¢2

4¡¢Ê¹ÓÃ__________·½·¨¿ÉÒÔ½«ÐµÄÁбíÏîÌí¼Óµ½Ò»¸öÁбí¿òÖС£ A¡¢Print B¡¢AddItem C¡¢Clear

D¡¢RemoveItem

5¡¢ÔÚ³ÌÐòÖпÉÒÔͨ¹ý¸´Ñ¡¿òºÍµ¥Ñ¡°´Å¥µÄ__________ÊôÐÔÖµÀ´ÅжÏËüÃǵĵ±Ç°×´Ì¬¡£ A¡¢Caption B¡¢Value C¡¢Checked D¡¢Selected

6¡¢ÒÔÏÂʹÓ÷½·¨µÄÓï¾äÖУ¬ÕýÈ·µÄÊÇ__________¡£ A¡¢List1.Clear B¡¢Form1.Clear C¡¢Combo1.Cls D¡¢Picture1.Clear

7¡¢Visual BasicÖгý´°ÌåÄÜÏÔʾͼƬÍ⣬ÏÂÃæÁгöµÄ¿Ø¼þÖпÉÒÔÏÔʾͼƬµÄ¿Ø¼þÓÐ__________¸ö¡£

PictureBox¡¢Image¡¢TextBox¡¢CommandButton¡¢OptionButton¡¢Label A¡¢2 B¡¢3 C¡¢4

23

D¡¢5

8¡¢Äܹ»Çø·Ö¸÷Êó±ê°´Å¥Ó롾Shift¡¿¡¢¡¾Ctrl¡¿¡¢¡¾Alt¡¿¼üµÄʼþ¹ý³ÌÊÇ__________¡£ A¡¢Click B¡¢Keypress C¡¢Dblclick D¡¢MouseMove

9¡¢ÏÂÁйØÓÚLineºÍShape¿Ø¼þ˵·¨²»ÕýÈ·µÄÊÇ__________¡£

A¡¢LineºÍShape¿Ø¼þ¶¼¿ÉÒÔÔÚ´°Ìå»òͼƬ¿ò¿Ø¼þÄÚ»æÖÆͼÐλò»­Ïß B¡¢LineºÍShape¿Ø¼þ»æÖƵÄͼÐβ»Ö§³ÖÈκÎʼþ C¡¢³ÌÐòÔËÐÐʱ¿ÉÒÔʹÓÃMove·½·¨Òƶ¯Line¿Ø¼þ

D¡¢¿ÉÒÔÔÚÈÝÆ÷ÖлæÖÆShape¿Ø¼þ£¬µ«ÊDz»ÄܰѸÿؼþµ±×÷ÈÝÆ÷ 10¡¢Visual BasicÖÐÀûÓÃCircle·½·¨²»¿ÉÒÔ»­__________¡£ A¡¢Ô² B¡¢Ö±Ïß C¡¢»¡ D¡¢ÍÖÔ²

11¡¢ÈçÏÂÓï¾äÖУ¬ÓëList1.List(List1.ListIndex)¹¦ÄÜÏàͬµÄÊÇ__________¡£ A¡¢List1.Text B¡¢List1.ListCount C¡¢Text1.Text D¡¢List1.ListIndex

12¡¢Ê¹ÓÃ__________·½·¨¿É½«ÐµÄÁбíÏîÌí¼Óµ½Ò»¸öÁбí¿òÖС£

A¡¢Print B¡¢AddItem C¡¢Clear D¡¢ RemoveItem 13¡¢ÔÚ³ÌÐòÖпÉÒÔͨ¹ý¸´Ñ¡¿òºÍµ¥Ñ¡°´Å¥µÄ__________ÊôÐÔÖµÀ´ÅжÏËüÃǵĵ±Ç°×´Ì¬¡£ A¡¢Caption B¡¢Checked C¡¢Value D¡¢Selected

14¡¢µ¥Ñ¡°´Å¥ÓÃÓÚÒ»×黥³âµÄÑ¡ÏîÖУ¬ÈôÒ»¸öÓ¦ÓóÌÐò°üº¬¶à×黥³âµÄÌõ¼þ¡£¿ÉÔÚ²»Í¬µÄ__________Öа²ÅÅÊʵ±µÄµ¥Ñ¡°´Å¥£¬¼´¿ÉÒÔʵÏÖ¡£

A¡¢¿ò¼Ü¿Ø¼þ»òͼÏñ¿Ø¼þ B¡¢×éºÏ¿ò»òͼÏñ¿Ø¼þ C¡¢×éºÏ¿ò»òͼƬ¿ò D¡¢¿ò¼Ü¿Ø¼þ»òͼƬ¿ò 15¡¢ÏÂÁÐʹÓ÷½·¨µÄÓï¾äÖУ¬ÕýÈ·µÄÊÇ________ ¡£ A¡¢List1.Clear B¡¢Form1.Clear C¡¢Combo1.Cls D¡¢Picture1.Clear 16¡¢ÔÚVBÖпÉÒÔ×÷ΪÈÝÆ÷µÄÊÇ_________¡£

A¡¢Form¡¢TextBox¡¢PictureBox B¡¢Form¡¢PictureBox¡¢Frame

C¡¢Form¡¢TextBox¡¢Label D¡¢PictureBox¡¢TextBox¡¢ListBox 17¡¢ÒÔÏÂËùÁеÄ6¸ö¿Ø¼þÖУ¬ CheckBox£¨¸´Ñ¡¿ò£©¡¢ComboBox£¨×éºÏ¿ò£©¡¢HscrollBar£¨Ë®Æ½¹ö¶¯Ìõ£©¡¢Image£¨Í¼Ïñ¿ò£©¡¢Frame£¨¿ò¼Ü£©¡¢Label£¨±êÇ©£©¡¢¾ßÓÐCaptionÊôÐÔµÄÓÐ__________¸ö¡£

A¡¢5 B¡¢4 C¡¢3 D¡¢2

18¡¢ÏÂÃæ Óï¾ä£¬¿ÉÒÔ½«Áбí¿òList1Öеĵ±Ç°Ñ¡¶¨µÄÁбíÏîµÄÖµÌæ»»³É¡±ABC¡±¡£ A¡¢List1.AddItem \ B¡¢List1.Text=\ C¡¢List1.List(List1.ListIndex)= \ D¡¢Ç°ÈýÏî¾ù¿É 19¡¢ÒÔÏ¿ؼþ¶ÔÏóÖУ¬²»¾ßÓÐtextÊôÐÔµÄÊÇ___________¡£

A¡¢±êÇ© B¡¢Îı¾¿ò C¡¢Áбí¿ò D¡¢×éºÏ¿ò 20¡¢²»¿ÉÒÔ×÷ΪÈÝÆ÷¶ÔÏóʹÓõÄÊÇ___________¡£

A¡¢¿ò¼Ü B¡¢Í¼Æ¬¿ò C¡¢´°Ìå D¡¢Í¼Ïñ¿ò

24

21¡¢Visual BasicÖУ¬Èκοؼþ¶¼¾ßÓÐ___________ÊôÐÔ¡£

A¡¢Text B¡¢Caption C¡¢(Ãû³Æ) D¡¢Font 22¡¢ÒýÓÃÁбí¿òµÄ×îºóÒ»ÏîӦʹÓÃ___________¡£ A¡¢List1.list(List1.ListCount-1) B¡¢List1.list(List1.ListCount) C¡¢List1.list(ListCount) D¡¢List1.list(ListCount-1)

23¡¢ÔÚ´°ÌåÉÏ»­Ò»¸öÃüÁî°´Å¥ºÍÁ½¸öÎı¾¿ò£¬È»ºó±àдÈçϵÄʼþ¹ý³Ì£º Private Sub Text1_KeyPress(KeyAscii As Integer£© ?? End Sub

¼Ù¶¨½¹µãÒѾ­Î»ÓÚÎı¾¿òÖУ¬ÔòÄܹ»´¥·¢KeyPressʼþµÄ²Ù×÷ÊÇ___________¡£ A¡¢µ¥»÷Êó±ê B¡¢Ë«»÷Îı¾¿ò C¡¢Êó±ê»¬¹ýÎı¾¿ò D¡¢°´Ï¼üÅÌÉϵÄij¸ö¼ü

24¡¢ÒªÊ¹Á½¸öµ¥Ñ¡°´Å¥ÊôÓÚͬһ¸ö¿ò¼Ü£¬ÕýÈ·µÄ²Ù×÷ÊÇ___________¡£ A¡¢ÏÈ»­Ò»¸ö¿ò¼Ü£¬ÔÙÔÚ¿ò¼ÜÖл­Á½¸öµ¥Ñ¡°´Å¥

B¡¢ÏÈ»­Ò»¸ö¿ò¼Ü£¬ÔÙÔÚ¿ò¼ÜÍâ»­Á½¸öµ¥Ñ¡°´Å¥£¬È»ºó°Ñµ¥Ô¶°´Å¥Íϵ½¿ò¼ÜÖÐ C¡¢ÏÈ»­Á½¸öµ¥Ñ¡°´Å¥£¬ÔÙ»­¿ò¼Ü½«µ¥Ñ¡°´Å¥¿òÆðÀ´ D¡¢ÒÔÉÏÈýÖÖ·½·¨¶¼ÕýÈ·

25¡¢ÒªÉèÖÃijÎı¾¿òµÄÎÄ×Ö¾ßÓдÖÌåЧ¹û£¬ÕýÈ·µÄÓï¾äÊÇ___________¡£ A¡¢Text1.FontItalic = True B¡¢Text1.FontItalic = False C¡¢Text1.FontBold = True D¡¢Text1.FontBold = False 26¡¢ÒªÑ¡ÔñÁбí¿òList1µÄµÚ6Ï¿ÉÒÔʹÓÃÓï¾ä___________¡£ A¡¢List1.ListIndex = 5 B¡¢List1.Selected= 5 C¡¢List1.ListIndex = 6 D¡¢List1.Selected = 6 27¡¢ÒýÓÃÁбí¿òList1µÄ×îºóÒ»ÏîӦʹÓÃ___________¡£

A¡¢List1.List(List1.ListCount - 1) B¡¢List1.List(List1.ListCount) C¡¢List1.List(ListCount) D¡¢List1.List(ListCount - 1) 28¡¢Óï¾äList1¡¢RemoveItem List1¡¢ListIndexµÄ×÷ÓÃÊÇ___________¡£ A¡¢É¾³ýÁбí¿òµÄ×îºóÒ»Ïî B¡¢É¾³ýÁбí¿òµÄµÚÒ»Ïî

C¡¢É¾³ýÁбí¿òÖе±Ç°Ñ¡ÖеÄÏî D¡¢É¾³ýÁбí¿òÖÐ×îºóÌí¼ÓµÄÒ»Ïî 29¡¢ÒªÇå³ý×éºÏ¿òCombo1ÖеÄËùÓÐÄÚÈÝ£¬¿ÉÒÔʹÓÃ___________Óï¾ä¡£ A¡¢Combo1.Cls B¡¢Combo1.Clear C¡¢Combo1.Delete D¡¢Combo1.Remove

30¡¢Timer¿Ø¼þµÄ___________ÊôÐÔ¾ö¶¨¸Ã¿Ø¼þÊÇ·ñ¶Ôʱ¼äµÄÍÆÒÆ×ö³öÏìÓ¦¡£½«¸ÃÊôÐÔÉèÖÃΪFalse»á¹Ø±ÕTimer¿Ø¼þ£¬ÉèÖÃΪTrueÔò´ò¿ªËü¡£

A¡¢Enabled B¡¢Visible C¡¢Time D¡¢Capable 31¡¢ÒªÊ¹¹ö¶¯Ìõ±íʾ×î´óÖµ100£¬Ó¦ÉèÖÃÆä___________ÊôÐÔ¡£

A¡¢Min B¡¢Max C¡¢SmallChange D¡¢LargeChange 32¡¢ÒªÉèÖÃijÎı¾¿òµÄÎÄ×Ö¾ßÓÐбÌåЧ¹û£¬ÕýÈ·µÄÓï¾äÊÇ ¡£ A¡¢Text1.FontItalic = True B¡¢Text1.FontItalic = False C¡¢Text1.FontBold = True D¡¢Text1.FontBold = False

25

33¡¢ÒªÑ¡ÔñÁбí¿òList1µÄµÚ4Ï¿ÉÒÔʹÓÃÓï¾ä___________¡£ A¡¢List1.Selected = 4 B¡¢List1.Selected(4) = True C¡¢List1.Selected = 3 D¡¢List1.Selected(3) = True 34¡¢ÒýÓÃÁбí¿òList1µÄµÚÒ»ÏîӦʹÓÃ___________¡£

A¡¢List1.List(1) B¡¢List1.List(List1.ListIndex) C¡¢List1.List(0) D¡¢List1.List(ListCount - 1)

35¡¢Óï¾äList1¡¢RemoveItem List1¡¢ListCount-1µÄ×÷ÓÃÊÇ___________¡£ A¡¢É¾³ýÁбí¿òµÄ×îºóÒ»Ïî B¡¢É¾³ýÁбí¿òµÄµÚÒ»Ïî C¡¢É¾³ýÁбí¿òÖе±Ç°Ñ¡ÖеÄÏî D¡¢É¾³ýÁбí¿òÖÐËùÓеÄÏî 36¡¢ÒªÇå³ýÁбí¿òList1ÖеÄËùÓÐÄÚÈÝ£¬¿ÉÒÔʹÓÃ___________Óï¾ä¡£ A¡¢List1.Cls B¡¢List1.Clear C¡¢List1.Delete D¡¢List1.Remove

37¡¢¶¨Ê±Æ÷µÄIntervalÊôÐÔÒÔ___________Ϊµ¥Î»Ö¸¶¨TimerʼþÖ®¼äµÄʱ¼ä¼ä¸ô¡£ A¡¢·Ö B¡¢Ãë C¡¢ºÁÃë D¡¢Î¢Ãë

38¡¢ÒªÊ¹Ã¿´Îµ¥»÷¹ö¶¯ÌõÁ½¶Ë¼ýͷʱ±ä»¯ÖµÎª10£¬Ó¦ÉèÖÃÆä___________ÊôÐÔ¡£ A¡¢Min B¡¢Max C¡¢SmallChange D¡¢LargeChange 39¡¢Í¨¹ýÉèÖÃShape¿Ø¼þµÄ___________ÊôÐÔ¿ÉÒÔ»æÖƶàÖÖÐÎ×´µÄͼÐΡ£ A¡¢Shape B¡¢BorderStyle C¡¢FillStyle D¡¢Style

40¡¢´°ÌåÉÏÓÐÁ½¸öÃû³Æ·Ö±ðΪText1¡¢Text2µÄÎı¾¿ò¡£Text1µÄKeyUpµÄʼþ¹ý³ÌÈçÏ£º Private Sub Text1_KeyUp(KeyCode As Integer , shift As Integer£© Dim C As string c=Text1¡¢Text

Text2¡¢Text=Chr(Asc(c£©+2£© End Sub

µ±ÏòÎı¾¿òText1ÖÐÊäÈëСд×Öĸaʱ£¬Îı¾¿òText2ÖÐÏÔʾµÄÊÇ___________¡£ A¡¢ A B¡¢ a C¡¢ C D¡¢ c

41¡¢Èç¹ûÔÚÁ½¸ö²Ëµ¥ÃüÁîÏîÖ®¼ä¼ÓÒ»Ìõ·Ö¸ôÏߣ¬¿ÉÔÚ±êÌâÎı¾¿òÖÐÊäÈë__________¡£ A¡¢- B¡¢+ C¡¢& D¡¢#

26

Îļþ

1¡¢Èô´ÅÅÌÎļþc:\\data1.dat²»´æÔÚ£¬ÔòÏÂÁдò¿ªÎļþÓï¾äÖлá³öÏÖ´íÎóµÄÊÇ__________¡£ A¡¢Open \B¡¢Open \C¡¢Open \D¡¢Open \

2¡¢Visual BasicÖÐÈýÖÖÎļþ·ÃÎʵÄÀàÐÍÊÇ__________¡£ A¡¢Ë³Ðò¡¢Ëæ»ú¡¢Îı¾ B¡¢Ë³Ðò¡¢Ëæ»ú¡¢¶þ½øÖÆ C¡¢Êý¾Ý¿â¡¢±í¸ñ¡¢Îı¾ D¡¢Îı¾¡¢Ëæ»ú¡¢¶þ½øÖÆ

3¡¢ÏÂÁÐÓйØÎļþµÄ˵·¨Öв»ÕýÈ·µÄÊÇ__________¡£

A¡¢µ±³ÌÐòÕý³£½áÊøʱ£¬ËùÓÐûÓÃCloseÓï¾ä¹Ø±ÕµÄÎļþ¶¼»á×Ô¶¯¹Ø±Õ

B¡¢ÔڹرÕÎļþ»ò³ÌÐò½áÊø֮ǰ£¬¿ÉÒÔ²»ÓÃUnlockÓï¾ä¶ÔÒÑËø¶¨µÄ¼Ç¼½âËø C¡¢¿ÉÒÔÓò»Í¬µÄÎļþºÅͬʱ´ò¿ªÒ»¸öËæ»úÎļþ

D¡¢ÓÃOutputģʽ´ò¿ªÒ»¸ö˳ÐòÎļþ£¬¼´Ê¹²»¶ÔËü½øÐÐд²Ù×÷£¬Ô­À´ÄÚÈÝÒ²±»Çå³ý 4¡¢ÒÔϹØÓÚÎļþµÄÐðÊöÖУ¬´íÎóµÄÊÇ___________¡£

A¡¢Ê¹ÓÃAppend·½Ê½´ò¿ªÎļþʱ£¬ÎļþÖ¸Õë±»¶¨Î»ÓÚÎļþβ

B¡¢µ±ÒÔÊäÈ뷽ʽ (Input£©´ò¿ªÎļþʱ£¬Èç¹ûÎļþ²»´æÔÚ£¬Ôò½¨Á¢Ò»¸öÐÂÎļþ C¡¢Ë³ÐòÎļþ¸÷¼Ç¼µÄ³¤¶È¿ÉÒÔ²»Í¬

D¡¢Ëæ»úÎļþ´ò¿ªºó£¬¼È¿ÉÒÔ½øÐжÁ²Ù×÷£¬Ò²¿ÉÒÔ½øÐÐд²Ù×÷

5¡¢ÉèÓÐÓï¾äOpen ¡°d:\\Test.txt¡± For Output As #1,ÒÔÏÂÐðÊöÖдíÎóµÄÊÇ___________¡£ A¡¢ÈôdÅ̸ùĿ¼ÏÂÎÞTest.txtÎļþ£¬Ôò¸ÃÓï¾ä´´½¨´ËÎļþ B¡¢ÓøÃÓï¾ä½¨Á¢µÄÎļþµÄÎļþºÅΪ1

C¡¢¸ÃÓï¾ä´ò¿ªdÅ̸ùĿ¼ÏÂÒ»¸öÒÑ´æÔÚµÄÎļþTest.txt£¬Ö®ºó¾Í¿ÉÒÔ´ÓÎļþÖжÁÈ¡ÐÅÏ¢ D¡¢Ö´ÐиÃÓï¾äºó£¬¾Í¿ÉÒÔͨ¹ýÓï¾äPrint #ÏòÎļþTest.txtдÈëÐÅÏ¢

6¡¢ÔÚVisual BasicÖа´ÎļþµÄ·ÃÎÊ·½Ê½²»Í¬£¬¿ÉÒÔ½«Îļþ·ÖΪ___________¡£ A¡¢Ë³ÐòÎļþ¡¢Ëæ»úÎļþºÍ¶þ½øÖÆÎļþ B¡¢Îı¾ÎļþºÍÊý¾ÝÎļþ C¡¢Êý¾ÝÎļþºÍ¿ÉÖ´ÐÐÎļþ D¡¢ASCIIÎļþºÍ¶þ½øÖÆÎļþ

7¡¢ÒªÔÚCÅ̸ùĿ¼Ï½¨Á¢Ò»¸öÃûΪ1.DatµÄ˳ÐòÎļþ£¬Ó¦Ê¹ÓÃ___________Óï¾ä¡£ A¡¢Open \ B¡¢Open \ C¡¢Open \ D¡¢Open \

8¡¢Ö´ÐÐÓï¾äOpen \ºó£¬ÏµÍ³___________¡£ A¡¢½«CÅ̸ùĿ¼ÏÂÃûΪ1.datµÄÎļþÄÚÈݶÁÈëÄÚ´æ B¡¢ÔÚCÅ̸ùĿ¼Ï½¨Á¢ÃûΪ1.datµÄ˳ÐòÎļþ

C¡¢½«ÄÚ´æÖÐÊý¾Ý´æ·ÅÔÚCÅ̸ùĿ¼ÏÂÃûΪ1.datµÄÎļþÖÐ

D¡¢½«Ä³¸ö´ÅÅÌÎļþµÄÄÚÈÝдÈëCÅ̸ùĿ¼ÏÂÃûΪ1.datµÄÎļþÖÐ

27

¸ù¾ÝÌâÄ¿ÒªÇóÍêÉƳÌÐò

1¡¢ÏÂÃæµÄ³ÌÐòÓÃÓÚÇóÈý¸öÊýÖеÄ×î´óÊýºÍ×îСÊý£¬ÇëÍêÉƳÌÐò¡£ Option Explicit

Private Sub Command1_Click()

Dim a As Integer, b As Integer, c As Integer Dim max As Integer, min As Integer a = Val(InputBox(\ÇëÊäÈëµÚÒ»¸öÊý\b = Val(InputBox(\ÇëÊäÈëµÚ¶þ¸öÊý\c = Val(InputBox(\ÇëÊäÈëµÚÈý¸öÊý\max = a

If b >___________ Then max = b If ___________ Then max = c min = a

If b <___________ Then min = b If ___________Then min = c Print \×î´óÊýΪ\Print \×îСÊýΪ\End Sub

2¡¢ÏÂÁгÌÐòµÄ¹¦ÄÜÊÇ£ºÔËÐгÌÐòÊ×ÏȳöÏÖÈç×óͼËùʾ£¨Form1£©µÄ½çÃ棬ҪÇóÓû§ÊäÈë¿ÚÁÊäÈëÍê±Ïºóµ¥»÷¡°È·¶¨¡±°´Å¥£¬ÈôÊäÈë¿ÚÁîÕýÈ·£¬ÔòÏÔʾForm2£¬·ñÔò³öÏÖÈçÓÒͼËùʾµÄÐÅÏ¢¿ò£»Èôµ¥»÷¡°È¡Ïû¡±°´Å¥£¬Ôò½áÊø³ÌÐò¡£ÒªÇóÍêÉƳÌÐò¡£

Private Sub Command1_Click() 'È·¶¨ Dim password As String

If password = \ ___________ Form2.Show Else

MsgBox End If End Sub

Private Sub Command2_Click() 'È¡Ïû ___________ End Sub

28

3¡¢ÈçϳÌÐòµÄ¹¦ÄÜÊÇÇóN!¡£ÍêÉƳÌÐò´úÂë¡£ Private Sub Form_Click()

Dim i As Integer, F As Long Dim N As Integer

N = InputBox(\ÇëÊäÈëN\ ___________ For i = 1 To N

F = ___________ Next i

Print N; \ End Sub

4¡¢ÏÂÁгÌÐòµÄ¹¦ÄÜÊÇ£ºÓÃ100ÔªÂò100Ö»¼¦£¬¹«¼¦Ã¿Ö»5Ôª£¬Ä¸¼¦Ã¿Ö»3Ôª£¬Ð¡¼¦Ò»Ôª3Ö»¡£ÒªÇóÍêÉƳÌÐò¡£ Private Sub form_Click()

Dim x As Integer, y As Integer, z As Integer For x = 0 To 20

For y = 0 To ___________ For z = 0 To 100 Step 3

If ___________ And ___________ Then Print x; y; z Next z, y, x End Sub

5¡¢ÏÂÁгÌÐòµÄ¹¦ÄÜÊÇ£ºÇóһάÊý×éµÄ×î´óÖµ¼°ÆäϱꡣҪÇóÍêÉƳÌÐò¡£ Option Base 1

Private Sub form_Click()

Dim t(10) As Integer, max As Integer, max_i As Integer For i = 1 To 10

t(i) = Int(Rnd * 100) Next i

max = t(1): max_i = ___________ For i = 2 To 10

If t(i) ___________Then max =___________ max_i = i End If Next i

Print max, max_i End Sub

6¡¢ÈçϳÌÐòµÄ¹¦ÄÜÊÇ£ºËæ»ú²úÉú12¸öÁ½Î»ÕûÊý£¬´æ·ÅÔÚÊý×éComÖУ¬²¢´ÓÖÐÕÒ³öÒ»¸ö×î´óÖµºÍÒ»¸ö×îСֵ£¬ÍêÉƳÌÐò¡£ Option Explicit Option Base 1

29

Private Sub Form_Click()

Dim Com(12) As Integer, I As Integer

Dim Max As Integer, ___________As Integer Randomize

For I = 1 To ___________

Com(I) = Int(___________* Rnd) + 10 Print Com(I); Next I Print

Max = Com(1): Min =___________ For I =___________ to 12 If Com(I) > Max Then ___________

ElseIf Com(I) < Min Then Min = Com(I) End If Next I

Print \×îСÊýÊÇ£º\ Print \×î´óÊýÊÇ£º\End Sub

7¡¢ÈçϳÌÐòµÄ¹¦ÄÜÊÇ£ºÓÃÑ¡Ôñ·¨¶ÔÊý×é°´ÉýÐòÅÅÐò£¬ÅÅÐòÇ°½«Ô­Ê¼Êý¾ÝÏÔʾÔÚText1ÄÚ£¬ÅÅÐòºóµÄ½á¹ûÏÔʾÔÚText2ÄÚ£¬ÍêÉƳÌÐò¡£ Option Explicit Option Base 1

Private Sub Command1_Click()

Dim Sort(10) As Integer, Temp As Integer Dim I As Integer, J As Integer Randomize

Text1 = \ For I = 1 To 10

Sort(I) = Int(99 * Rnd) + 1 Text1 = ___________ Next I

For I = 1 To ___________ For J =___________to 10 If ___________Then Temp = Sort(I) Sort(I) = Sort(J) Sort(J) = Temp End If Next J

Text2 = Text2 & Str(Sort(I)) Next I

30

Text2 = Text2 & Str(Sort(I)) End Sub

8¡¢ÈçϳÌÐòµÄ¹¦ÄÜÊÇÕÒ³ö200ÒÔÄÚËùÓеÄËØÊý£¬²¢°´Ã¿ÐÐ10¸öµÄÐÎʽÊä³ö¡£ÍêÉƳÌÐò´úÂë¡£ Option Base 1 Option Explicit

Private Sub Form_Click()

Dim Prime() As Integer, I As Integer

Dim K As Integer, M As Integer, J As Integer M = 1

Redim Prime(M) Prime(M) = 2

For I = 3 To 199 Step 2

For K = 2 To ___________

If ___________Then Exit For Next K

If K > Sqr(I) Then

M = M + 1

Preserve Prime(M) Prime(M) = I End If Next I

For J = 1 To Ubound(Prime) Print Prime(J);

If J Mod ___________ = 0 Then Print Next J End Sub

9¡¢ÏÂÃæµÄ³ÌÐò¹¦ÄÜÊÇ£ºÉú³É100¸ö -10µ½10Ö®¼äµÄËæ»úÕûÊý²¢ÏÔʾµ½Îı¾¿òÖУ¬Í³¼ÆÕâ100¸öÊýÖÐ -10 ¡¢-5 ¡¢ 5 ¡¢10µÄ¸öÊý²¢ÏÔʾÔÚͼƬ¿òÖС£ÇëÍêÉƳÌÐò¡£ Dim A(1 To 100) As Integer Private Sub Command1_Click()

Dim num1 As Integer, num2 As Integer, num3 As Integer, num4 As Integer num1 = 0: num2 = 0: num3 = 0: num4 = 0 For I = 1 To 100

Select Case ___________ Case -10

num1 = num1 + 1 Case -5

num2 = num2 + 1 Case 5

num3 = num3 + 1 Case 10

num4 = num4 + 1 End Select Next I

Picture1.Print \µÄ¸öÊý=\µÄ¸öÊý=\Picture1.Print \µÄ¸öÊý=\µÄ¸öÊý=\End Sub

31

Private Sub Form_Load()

Text1.Text = \For I = 1 To 100

___________= Int(Rnd() * 21 - 10)

Text1.Text = ___________& Str(A(I)) & \ \Next I End Sub

10¡¢ÏÂÃæµÄ¹ý³ÌÓñȽϽ»»»·¨ÊµÏÖÊý¾Ý´Ó´óµ½Ð¡µÄÅÅÐò£¬ÇëÍêÉÆ´úÂë¡£ Sub SortArray(a() As Integer) Dim i As Integer, j As Integer Dim n As Integer, t As Integer ___________= UBound(a) For i = 1 To n - 1

For j =___________ To n If a(i) < a(j) Then t =___________ a(i) = a(j)

___________= t End If Next j Next i End Sub

11¡¢ÏÂÁгÌÐò´úÂë¶ÁÈëN¸öÊý£¬ÓñȽϽ»»»·¨¶ÔÕâN¸öÊý°´´Ó´óµ½Ð¡µÄ˳ÐòÅÅÐò£¬²¢ÔÚÎı¾¿òText1ÖÐÊä³öÅÅÐò½á¹û¡£ Private Sub Command1_Click()

Dim a() As Integer

Dim i As Integer, j As Integer Dim t As Integer, n As Integer

n = Val(InputBox(\ÇëÊäÈëÕýÕûÊýN£º\ ReDim ___________ For i = 1 To n

___________= Val(InputBox(\ÇëÊäÈëµÚ\¸öÊý\ Next i

For i = 1 To n - 1

For j = ___________To n If a(i) < a(j) Then t = a(i)

a(i) =___________ a(j) = ___________ End If Next j Next i

For i = 1 To n

Text1.Text = Text1.Text & Str(a(i)) & \ Next i End Sub

12¡¢ÒÔϳÌÐò´úÂëʵÏÖµ¥»÷ÃüÁî°´Å¥Command1ʱÉú³É20¸ö[0,100]Ö®¼äµÄËæ»úÕûÊý£¬´æÓÚÊý×éÖУ¬´òÓ¡Êý×éÖдóÓÚ50µÄÊý£¬²¢ÇóÕâЩÊýµÄºÍ¡£ Private Sub Command1_Click()

Dim a(1 To 20) As Integer

Dim i As Integer, sum As Integer For i = 1 To 20

a(i) = ___________

32

Picture1.Print a(i); Next i

For i = 1 To 20

If ___________Then Picture2.Print a(i); sum = ___________ End If Next i

Picture2.Print

Picture2.Print \End Sub

13¡¢ÏÂÁгÌÐòµÄ¹¦ÄÜÊÇ£ºÔÚ´°ÌåÉÏÉú³É°üº¬ÓÐ[1£¬10]Ö®¼äËæ»úÕûÊýµÄ6ÐÐ6ÁеľØÕ󣬲¢¶Ô¸Ã¾ØÕó½øÐÐתÖá£ÒªÇóÍêÉƳÌÐò¡£ Option Base 1

Private Sub form_Click()

Dim a(6, 6) As Integer, b(6, 6) As Integer For i = 1 To 6 For j = 1 To 6

a(i, j) = ___________ Print a(i, j); Next j

___________ Next i Print

For i = 1 To 6 For j = 1 To 6

b(i, j) = ___________ Print b(i, j); Next j Print Next i End Sub

14¡¢ÏÂÃæ³ÌÐòµÄ¹¦ÄÜÊÇ£ºÔÚ´°ÌåÉÏÊä³öÒ»¸öNÐС¢NÁС¢Ö÷¶Ô½ÇÏߺʹζԽÇÏßÔªËØΪ1¡¢ÆäÓàÔªËؾùΪ0µÄ¾ØÕó¡£NÓÉÓû§Ö¸¶¨¡£ÇëÍêÉƳÌÐò¡£ Option Base 1

Dim A() As Integer

Private Sub Form_Click()

Dim N As Integer, I As Integer, J As Integer

N = Val(InputBox(\ÇëÊäÈëNÖµ\Éú³É¾ØÕó\ReDim For I = 1 To N For J = 1 To N A(I, J) = 0

If ___________Then A(I, J) = 1 End If

If I + J = N + 1 Then A(I, J) = 1

33

End If Next J, I

For I = 1 To N For J = 1 To N

Print ___________; Next J Print Next I End Sub

15¡¢ÏÂÁгÌÐòµÄ¹¦ÄÜÊÇ£º¼ÆËãÅᲨÄÇÆõÊýÁеÚnÏîµÄÖµ£¨nÓÉÓû§ÊäÈ룩¡£ÒªÇóÍêÉƳÌÐò¡£ Private Sub form_Click() Dim n As Integer

n = InputBox(\ÊäÈëÕûÊýn\ Print f___________ End Sub

Private Function f(ByVal a As Integer) As Integer If ___________Then f = 0

ElseIf a = 2 Then ___________ Else

f = ___________ End If End Function

16¡¢ÏÂÃæ³ÌÐòµÄ¹¦ÄÜÊÇ£ºÔÚ´°ÌåµÄÎı¾¿òText1ÖÐÊäÈëÒ»¸öÕýÕûÊý£¬µ±µ¥»÷ÃüÁî°´Å¥ºó£¬ÔÚ´°ÌåµÄÎı¾¿òText2ÖÐÊä³öÕâ¸öÕýÕûÊýµÄ½×³Ë¡£ÇëÍêÉƳÌÐò¡£ Option Explicit

Function Fact(N As Integer) As Long

Dim I As Integer, F As Long F = ___________

For I = 1 To F = F * I Next I

___________ End Function

Private Sub Command1_Click()

Dim X As Integer X = Val(Text1.Text)

Text2.Text = Str___________ End Sub

17¡¢ÏÂÃæÊÇÇóÁ½¸öÕýÕûÊýmºÍnµÄ×î´ó¹«Ô¼ÊýµÄº¯Êý£¬ÇëÍêÉÆ´úÂë¡£ Function gcd(m As Integer, n As Integer) As Integer

Dim r As Integer r = m Mod n

Do While r___________0 ___________= n ___________= r r = m Mod n Loop gcd = n

34

End Function

18¡¢ÔÚ´°ÌåÉÏ»­Ò»¸öÃüÁî°´Å¥ºÍÒ»¸öÎı¾¿ò£¬ÆäÃû³Æ·Ö±ðΪCommand1ºÍText1£¬È»ºó±àдÈçÏÂʼþ¹ý³Ì£º

Private Sub Command1_Click(£©

Dim St As String Text1.Text = \

Open \Do While ___________ Input #1, St

Text1.Text = Text1.Text & St Loop End Sub

³ÌÐòµÄ¹¦ÄÜÊÇ£¬´ò¿ªDÅ̸ùĿ¼ÏµÄÎı¾Îļþmyfile.txt£¬¶ÁÈ¡ËüµÄÈ«²¿ÄÚÈݲ¢ÏÔʾÔÚÎı¾¿òÖС£

35

¸ù¾Ý³ÌÐòдÔËÐнá¹û

1¡¢ÔËÐÐÏÂÃæµÄ³ÌÐò£¬µ¥»÷´°ÌåºóÔÚ´°ÌåÏÔʾµÄÄÚÈÝÊÇ___________¡£ Private Sub Form_Click()

Dim x As Integer, y As Integer x = 1: y = 0 Do While x < 3 y = y + x x = x + 1 Loop Print x, y End Sub

2¡¢ÔËÐÐÏÂÃæµÄ³ÌÐò£¬µ¥»÷´°ÌåºóÔÚ´°ÌåÏÔʾµÄµÚÈýÐÐÄÚÈÝÊÇ___________¡£ Private Sub Form_Click()

Dim mystr As String, mystr1 As String, mystr2 As String mystr1 = \ For i = 1 To 3

mystr2 = LCase(mystr1) mystr1 = mystr1 & mystr2 mystr = mystr & mystr1 Print mystr

mystr1 = Chr(Asc(mystr1) + i) Next i End Sub

3¡¢ÔËÐÐÏÂÃæµÄ³ÌÐò£¬µ¥»÷ÃüÁî°´Å¥£¬ÔÚÎı¾¿òÄÚÏÔʾµÄÄÚÈÝÊÇ___________¡£ Private Sub Command1_Click() For i = 1 To 4 x = 4

For j = 1 To 3 x = 3

For k = 1 To 2 x = x + 6 Next k, j, i

Text1.Text = Str(x) End Sub

4¡¢ÔËÐÐÏÂÃæµÄ³ÌÐò£¬µ¥»÷´°ÌåºóÔÚ´°ÌåÏÔʾµÄÄÚÈÝÊÇ___________¡£ Option Base 1

Private Sub Form_Click()

36

Dim a(3, 3) As Integer, i As Integer For i = 1 To 3 For j = 1 To 3

a(i, j) = (i - 1) * 4 + j Next j Next i

For i = 1 To 3 Print a(i, 4 - i); Next i End Sub 5¡¢ÈçϳÌÐòÔËÐкó£¬ÔÚ´°ÌåÉÏÊä³öµÄµÚÒ»ÐÐÄÚÈÝÊÇ___________£¬µÚ¶þÐÐÄÚÈÝÊÇ___________¡£ Private Sub Command1_Click()

Dim p As Integer, I As Integer, n As Integer p = 2: n = 20

For I = 1 To n Step p p = p + 2 n = n - 4 I = I + 2

If p >= 10 Then Exit For Next I Print p; n Print I End Sub

6¡¢ÏÂÃæ³ÌÐò¶ÎÖ´ÐÐÒ»´Îºó£¬´°ÌåÉÏÓÐ___________ÐÐÊä³ö£¬ÆäÖеÚÒ»ÐÐÉÏÏÔʾµÄÊÇ___________£¬µÚËÄÐÐÉÏÏÔʾµÄÊÇ___________¡£ Option Explicit Option Base 1

Private Sub Command1_Click()

Dim a(5) As Integer Dim i As Integer For i = 1 To 5

If i Mod 2 = 0 Then a(i) = i + 1 Else

a(i) = 5 - i End If Print a(i) Next i End Sub

7¡¢ÒÑÖª³ÌÐò¶ÎÄÚÈÝÈçÏ£¬ÔÚÎı¾¿òText1ÖÐÊäÈë3£¬ÔÚÎı¾¿òText2ÖÐÊäÈë5£¬µ±µ¥»÷ÃüÁî°´Å¥Command1ºó£¬Îı¾¿òText1ÖÐÏÔʾµÄÊÇ___________£¬Îı¾¿òText2ÖÐÏÔʾµÄÊÇ___________¡£ Option Explicit

Private Sub Command1_Click()

Dim a As Integer, b As Integer, c As Integer a = Val(Text1.Text)

37

b = Val(Text2.Text) c = a + b a = c - a b = c - a

Text1.Text = CStr(a) Text2.Text = CStr(b) End Sub

8¡¢ÔËÐÐÏÂÃæµÄ³ÌÐò£¬µ¥»÷´°ÌåºóÔÚ´°ÌåÏÔʾµÄÄÚÈÝÊÇ___________¡£ Private Sub Form_Click() Dim a As Integer a = 2

Call sub1(a) End Sub

Private Sub sub1(x As Integer) x = x * 2 + 1 If x < 10 Then Call sub1(x) End If

x = x * 2 + 1 Print x; End Sub

9¡¢ÒÑ֪ij³ÌÐòÄÚÈÝÈçÏ£¬µ±ÔÚ´°ÌåÉϵ¥»÷ʱ´°ÌåÉÏÏÔʾµÄÄÚÈÝÓÐ___________ÐУ¬µÚÒ»ÐÐÉÏÏÔʾµÄÊÇ___________£¬×îºóÒ»ÐÐÉÏÏÔʾµÄÊÇ___________¡£

Function SumOrMulti(Operate As Boolean, ParamArray var()) As Long

Dim sum As Long, multi As Long If Operate Then sum = 0

For Each x In var sum = sum + x Next x

SumOrMulti = sum Else

multi = 1

For i = LBound(var) To UBound(var) multi = multi * var(i) Next i

SumOrMulti = multi End If End Function

Private Sub Form_Click()

Print SumOrMulti(True, 1, 3, 5, 7) Print SumOrMulti(False, 2, 4) End Sub

10¡¢ÒÑ֪ij³ÌÐòÄÚÈÝÈçÏ£¬µ±ÔÚ´°ÌåÉϵ¥»÷ÃüÁî°´Å¥Command1ºó£¬´°ÌåÉÏÏÔʾµÄAµÄÖµÊÇ___________£¬BµÄÖµÊÇ___________£¬CµÄÖµÊÇ___________¡£ Sub SS(ByVal X, ByVal Y, ByVal Z)

X = X + 1: Y = Y + 1: Z = Z + 1 End Sub

Private Sub Command1_Click()

38

A = 1: B = 2: C = 3 Call SS(A, B, C) Print A, B, C End Sub

39

×ÛºÏÓ¦ÓÃÌâ

1¡¢±àд³ÌÐò£¬ÇóÔ²ÖùÌåµÄµ×Ãæ»ý¡¢²àÃæ»ýºÍÌå»ý¡£ÔËÐнçÃæÈçͼËùʾ¡£

Command1

Private Sub Command1_Click() Const pi = 3.14 Dim r As Single Dim h As Single r = Val(Text2.Text) h = Val(Text1.Text) Text3.Text = pi * r ^ 2 Text4.Text = 2 * pi * r * h

Text5.Text = Val(Text3.Text) * Val(Text1.Text) End Sub

2¡¢ÓÃÌõ¼þÓï¾äʵÏÖ£º´ÓÎı¾¿ò£¨Text1£©ÊäÈëÒ»¸öÊý£¬µ¥»÷¡°Åжϡ±°´Å¥£¨Command1£©ÅжÏËüÄÜ·ñͬʱ±»3¡¢5¡¢7Õû³ý£¬ÈôÄÜÕû³ý£¬ÔòÓÃÏûÏ¢¿ò£¨Msgboxº¯Êý£©ÏÔʾ¡°ÄÜͬʱ±»3¡¢5¡¢7Õû³ý¡±£¬·ñÔòÏÔʾ¡°²»ÄÜÕû³ý¡±¡£

Private Sub Command1_Click() a = Val(Text1.Text)

If a Mod 3 = 0 And a Mod 5 = 0 And a Mod 7 = 0 Then MsgBox \ÄÜͬʱ±»3¡¢5¡¢7Õû³ý\ Else

MsgBox \²»ÄÜÕû³ý\ End If End Sub

40

3¡¢Ê¹ÓÃÑ­»·¿ØÖƽṹÔÚ´°ÌåÉÏ´òÓ¡³öÏÂÈý½ÇÐÎʽµÄ¾Å¾Å³Ë·¨±í¡££¨½çÃæÈçͼËùʾ£©

Command1

Private Sub Command1_Click()

Dim a(9, 9) As Integer, i As Integer, j As Integer For i = 1 To 9 For j = 1 To i a(i, j) = i * j Print i & \\ Next j Print Next i End Sub

4¡¢±àд³ÌÐò£¬¶ÔÊäÈëµÄѧÉú³É¼¨¸ø³öÎ弶ÆÀ·Ö¡£ÒªÇó£ºÑ§Éú³É¼¨ÓÉÎı¾¿ò£¨Text1£©ÊäÈ룬½á¹ûÏÔʾÔÚ±êÇ©£¨Label1£©ÖС£ÆÀ·Ö±ê×¼ÈçÏ£º ÓÅ 90¡Ü³É¼¨¡Ü100 Á¼ 80¡Ü³É¼¨<90 ÖÐ 70¡Ü³É¼¨<80 ¼°¸ñ 60¡Ü³É¼¨<70 ²»¼°¸ñ 0¡Ü³É¼¨<60

Private Sub Command1_Click() grade = Val(Text1.Text) Select Case grade

Case Is > 100,Is < 0 Label1.caption=\

MsgBox \ÇëÊäÈëÕýÈ··ÖÊý\´íÎó\ Text1.SetFocus Text1.SelStart = 0

Text1.SelLength = Len(Text1.Text) Case Is >= 90

Label1.Caption = \ÓÅ\ Case Is >= 80

Label1.Caption = \Á¼\ Case Is >= 70

Label1.Caption = \ÖÐ\ Case Is >= 60

41

Label1.Caption = \¼°¸ñ\ Case Is >= 0

Label1.Caption = \²»¼°¸ñ\ End Select

Text1.SetFocus

Text1.SelStart = 0

Text1.SelLength = Len(Text1.Text) End Sub

5¡¢±àд³ÌÐòÇó

?k??kk?1k?1100502µÄÖµ£¬ÒªÇó½á¹ûÏÔʾÔÚ´°ÌåÉÏ¡£

Private Sub Command1_Click() Dim i As Integer, sum As Long For i = 1 To 100 sum = sum + i Next i

For i = 1 To 50

sum = sum + i ^ 2 Next i Print sum End Sub

6¡¢Ëæ»úÉú³É15¸ö100ÒÔÄÚµÄÕýÕûÊý²¢ÏÔʾÔÚÒ»¸öÎı¾¿ò£¨Text1£©ÖУ¬ÔÙ½«ËùÓжԳÆλÖõÄÁ½¸öÊý¾Ý¶Ôµ÷ºóÏÔʾÔÚÁíÒ»¸öÎı¾¿ò£¨Text2£©ÖУ¨µÚ1¸öÊýÓëµÚ15¸öÊý¶Ôµ÷£¬µÚ2¸öÊýÓëµÚ14¸öÊý¶Ôµ÷£¬??£¬µÚ7¸öÊýÓëµÚ9¸öÊý¶Ôµ÷£©¡£

Option Base 1

Private Sub Command1_Click() Dim a(15) As Integer For i = 1 To 15

a(i) = Int(Rnd * 100 + 1)

Text1.Text = Text1.Text & ¡° ¡± & a(i) Next i

For i = 1 To 7 t = a(i)

a(i) = a(16 - i) a(16 - i) = t Next i

For i = 1 To 15

Text2.Text = Text2.Text & ¡° ¡± & a(i) Next i End Sub

7¡¢Ëæ»úÉú³É20¸öÁ½Î»ÕýÕûÊýÏÔʾÔÚÒ»¸öÎı¾¿ò£¨Text1£©ÖУ¬²¢Çó³öËüÃǵÄƽ¾ùÖµÏÔʾÔÚÁíÒ»¸öÎı¾¿ò£¨Text2£©ÖС£

Option Base 1

42

Private Sub Command1_Click() Dim a(20) As Integer For i = 1 To 20

a(i) = Int(Rnd * 90 + 10)

Text1.Text = Text1.Text & \ Sum = Sum + a(i) Next i

Text2 = Str(Sum / 20) End Sub

8¡¢Ëæ»úÉú³É50¸öÈýλÕýÕûÊýÏÔʾÔÚÒ»¸öÎı¾¿òÖУ¨Text1£©ÖУ¬²¢½«ËüÃÇÄæÐòÏÔʾÔÚÁíÒ»¸öÎı¾¿ò£¨Text2£©ÖС£

Option Base 1

Private Sub Command1_Click() Dim a(50) As Integer For i = 1 To 50

a(i) = Int(Rnd * 900 + 100)

Text1.Text = Text1.Text & \ Next i

For i = 50 To 1 Step -1

Text2.Text = Text2.Text & \ Next i End Sub

9¡¢ÓÃInputBoxº¯ÊýÊäÈë10¸öÊýµ½Êý×éAÖУ¬ÊäÈëºó½«Õâ10¸öÊýÏÔʾÔÚÒ»¸öÎı¾¿ò£¨Text1£©ÖУ¬²¢¼ÆËãÆäÖÐËùÓÐÕýÊýµÄºÍ£¬½«½á¹ûÏÔʾÔÚÁíÒ»¸öÎı¾¿ò£¨Text2£©ÖС£

Option Base 1

Private Sub Command1_Click() Dim a(10) As Integer For i = 1 To 10

a(i) = Val(InputBox(\ÊäÈëÊý¾Ý\ Text1.Text = Text1.Text & \ If a(i) > 0 Then Sum = Sum + a(i) Next i

Text2 = Sum End Sub

10¡¢Éú³É100¸ö[0,100]Ö®¼äµÄËæ»úÕûÊý´æÓÚÊý×éAÖУ¬²¢½«ËüÃÇÏÔʾÔÚÒ»¸öÎı¾¿ò£¨Text1£©ÖУ¬ÔÚÊý×éAÖвéÕÒÖ¸¶¨µÄÔªËØNumber¡£ÒªÇó£ºNumberÓÃInputBoxº¯ÊýÊäÈ룬²éÕÒ½á¹ûÏÔʾÔÚ´°ÌåÉÏ¡£

Option Base 1

Private Sub Command1_Click() Dim a(100) As Integer For i = 1 To 100

a(i) = Int(Rnd * 101)

Text1.Text = Text1.Text & \

43

Next i

Number = Val(InputBox(\ÊäÈëÊý¾Ý\ For i = 1 To 100

If a(i) = Number Then Print i k = k + 1 End If Next i

If k = 0 Then MsgBox \²»´æÔÚËù²éÕÒµÄÊý\End Sub

11¡¢±à³ÌÇóÓÉһλËæ»úÕûÊý¹¹³ÉµÄ4¡Á5¶þάÊý×éAµÄÿһÁÐÔªËصĺ͡£ÔËÐнçÃæÈçͼËùʾ¡£

Option Base 1

Private Sub Command1_Click() Dim a(4, 5) As Integer For i = 1 To 4 For j = 1 To 5

a(i, j) = Int(Rnd * 9 + 1)

Text1.Text = Text1.Text & \ Next j

Text1.Text = Text1.Text & vbCrLf Next i

For j = 1 To 5 Sum = 0

For i = 1 To 4

Sum = Sum + a(i, j) Next i

Text2.Text = Text2.Text & \ Next j End Sub

12¡¢µ¥»÷ÃüÁî°´Å¥command1ʱ£¬Éú³É°üº¬[1,9]Ö®¼äËæ»úÕûÊýµÄÁ½¸ö5*5¾ØÕ󣬷ֱðÏÔʾÔÚͼƬ¿òPicture1ºÍPicture2ÖУ¬²¢ÇóÁ½¸ö¾ØÕóÖ®ºÍÏÔʾÔÚͼƬ¿òPicture3ÖС£

44

Option Base 1

Dim a(5, 5) As Integer, b(5, 5) As Integer, c(5, 5) As Integer

Private Sub Command1_Click() Picture3.Cls Randomize For i = 1 To 5

For j = 1 To 5

a(i, j) = Int(Rnd * 9 + 1) b(i, j) = Int(Rnd * 9 + 1)

Picture1.Print Format(a(i, j), \ Picture2.Print Format(b(i, j), \ Next j

Picture1.Print Picture2.Print Next i

For i = 1 To 5

For j = 1 To 5

c(i, j) = a(i, j) + b(i, j)

Picture3.Print Format(c(i, j), \ Next j

Picture3.Print Next i

End Sub

13¡¢±àд³ÌÐò£¬ÔÚ´°ÌåÉÏ´òÓ¡³öÈçͼËùʾµÄÑî»ÔÈý½ÇÐΡ£ÒªÇó£ºÐÐÊýÓÉÓû§Ö¸¶¨¡£

Option Base 1 Dim a() As Double

Private Sub Form_Click()

n = Val(InputBox(\ÊäÈë´òÓ¡ÐÐÊý\

45

Form1.Cls ReDim a(n, n) a(1, 1) = 1 a(2, 1) = 1 a(2, 2) = 1 Print Print Print

For i = 1 To n For j = 1 To i

If j = 1 Or j = i Then a(i, j) = 1 Else

a(i, j) = a(i - 1, j - 1) + a(i - 1, j) End If

Print a(i, j); Next j Print Next i

End Sub

14¡¢Ëæ»úÉú³ÉÒ»¸öÓÉÁ½Î»ÕýÕûÊý¹¹³ÉµÄ5ÐÐ5ÁоØÕóÏÔʾÔÚ´°ÌåÉÏ£¬²¢Çó³ö¸Ã¾ØÕóÖÐÁ½Ìõ¶Ô½ÇÏßÔªËØÖ®ºÍ¡£

Option Base 1

Private Sub Command1_Click() Dim a(5, 5) As Integer For i = 1 To 5 For j = 1 To 5

a(i, j) = Int(Rnd * 90 + 10)

If j = 1 Or i + j = 6 Then s = s + a(i, j) Print a(i, j); Next j Print Next i Print Print Print s End Sub

15¡¢Ëæ»úÉú³ÉÒ»¸öÓÉÁ½Î»ÕýÕûÊý¹¹³ÉµÄ6ÐÐ6ÁоØÕóÏÔʾÔÚ´°ÌåÉÏ£¬²¢Çó³ö¸Ã¾ØÕóÖÐËùÓÐÔªËØÖ®ºÍ¡£

Option Base 1

Private Sub Command1_Click() Dim a(6, 6) As Integer For i = 1 To 6

46

For j = 1 To 6

a(i, j) = Int(Rnd * 90 + 10) s = s + a(i, j) Print a(i, j); Next j Print Next i Print Print Print s End Sub

16¡¢±àдһ¸öÇó1£«2£«3£«?£«nµÄº¯Êý£¬µ¥»÷ÃüÁî°´Å¥£¨Command1£©Ê±µ÷Óøú¯ÊýÇó1£«2£«3£«4£«5µÄÖµ£¬½á¹ûÏÔʾÔÚÒ»¸öÎı¾¿ò£¨Text1£©ÖС£

Option Base 1

Private Sub Command1_Click() Text1.Text = F(5) End Sub

Public Function F(n As Integer) As Integer For i = 1 To n F = F + i Next i

End Function

17¡¢±àд³ÌÐò£¬ÅжÏÒ»¸öÊýNÊÇ·ñÊÇÆæÊý¡£ÒªÇóʹÓÃͨÓùý³Ì¡£

Private Sub Command1_Click() Dim n As Integer

n = Val(InputBox(\ÊäÈëÐèÒªÅжϵÄÊý\ Print F(n) End Sub

Public Function F(n As Integer) As Boolean If n Mod 2 = 0 Then F = False Else

F = True

18¡¢±àдÇó±í´ïʽ

x3?y3?z3µÄÖµµÄFunction¹ý³Ì¡£

Public Function Fact(X As Integer, Y As Integer, Z As Integer) As Single

Fact = Sqr(Abs(X ^ 3 + Y ^ 3 + Z ^ 3))

47

End Function

19¡¢±àдһ¸öÉãÊÏζÈÓ뻪ÊÏζÈת»»µÄͨÓùý³Ì¡£ÔÚÒ»¸öÎı¾¿ò£¨Text1£©ÖÐÊäÈëÉãÊÏζȣ¬µ¥»÷ÃüÁî°´Å¥command1ʱµ÷ÓøÃͨÓùý³ÌÔÚÁíÒ»¸öÎı¾¿ò£¨Text2£©ÖÐÏÔʾ¶ÔÓ¦µÄ»ªÊÏζȡ£ÉãÊÏζȣ¨C£©Ó뻪ÊÏζȣ¨F£©×ª»»µÄ¹«Ê½ÊÇ£ºF?C?9?5?32¡£

Private Sub Command1_Click() Dim c As Double c = Val(Text1.Text) Text2.Text = CStr(F(c)) End Sub

Public Function F(c As Double) As Double F = c * 9 / 5 + 32 End Function

20¡¢±àдһ¸öÅжÏijÕýÕûÊýNÊÇ·ñÊÇÍêÊýµÄͨÓùý³Ì¡£ÍêÊý£ºÒ»¸öÊýÇ¡ºÃµÈÓÚËüµÄÒò×ÓÖ®ºÍ£¨³ý×ÔÉí£©£¬È磺6£½1£«2£«3£¬Òò´Ë6ÊÇÍêÊý¡£

Public Function F(n As Integer) As Boolean F=False

For i = 1 To n - 1

If n Mod i = 0 Then s = s + i Next i

If s = i Then F = True End Function

21¡¢±àдһ¸öÇóÕýÕûÊýmºÍÕýÕûÊýnµÄ×î´ó¹«Ô¼ÊýµÄº¯Êý¡£

Public Function F(m As Integer, n As Integer) As Integer r = m Mod n While r <> 0 m = n n = r

r = m Mod n Wend F = n End Function

22¡¢±àдһ¸ö¶ÔÊý×éÔªËؽøÐÐÅÅÐòµÄͨÓùý³Ì¡£

Public Sub P(X() As Integer)

Dim i As Integer, j As Integer, n as integer N=ubound(x) For i = 1 To n - 1 For j = i To n

If X(i) > X(j) Then t = X(i) X(i) = X(j) X(j) = t End If

48

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ì滻Ϊ@)