(完整word版)江苏省二级VB2006(秋)上机1试题及答案.pdf

上传人:H****o 文档编号:55057527 上传时间:2022-10-29 格式:PDF 页数:5 大小:95.25KB
返回 下载 相关 举报
(完整word版)江苏省二级VB2006(秋)上机1试题及答案.pdf_第1页
第1页 / 共5页
(完整word版)江苏省二级VB2006(秋)上机1试题及答案.pdf_第2页
第2页 / 共5页
点击查看更多>>
资源描述

《(完整word版)江苏省二级VB2006(秋)上机1试题及答案.pdf》由会员分享,可在线阅读,更多相关《(完整word版)江苏省二级VB2006(秋)上机1试题及答案.pdf(5页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、江苏省高等学校非计算机专业学生计算机基础知识和应用能力等级考试上机试题(2006 年秋)二级 Visual Basic 语言(试卷代号 VB01)(本试卷完成时间 70 分钟)一、改错(14 分)(题目)本程序用于验证210 之间的整数的立方都等于一串连续奇数的和。Option Explicit Private Sub Command1_Click()Dim i As Integer,st As String Dim n()As Integer,k As Integer For i=2 To 10 Call check(i,n)st=st&CStr(i)&3=&CStr(i 3)&=For k

2、=1 To UBound(n)-1 st=st&Str(n(k)&+Next k st=st&Str(n(k)&vbCrLf Next i Text1=st End Sub Private Sub check(n As Integer,a()As Integer)Dim sum As Integer,i As Integer,j As Integer Dim p As Integer n=n 3 For i=1 To n 2 Step 2 For j=i To n Step 2 p=0 sum=sum+j p=p+1 ReDim Preserve a(p)a(p)=j If sum=n The

3、n Exit For If sum n Then Exit For Next j Erase a sum=0 Next i End Sub 要求 1新建工程,输入上述代码,改正程序中的错误;2改错时,不得增加或删除语句,但可以适当调整语句位置;3将窗体文件和工程文件分别命名为F1 和 P1,并保存到软盘A 的根目录下。二、编程题(26 分)题目 编写一个找出所有五位绝对素数的程序。所谓绝对素数是指本身是素数,其逆序数也是素数的数。例如,10321 与 12301 都是素数,所以10321 是绝对素数。编程要求 1 程序参考界面如图所示,编程时不得增加或减少界面对象或改变对象的种类,窗体及界面元

4、素大小适中,且均可见。2按“查找”按钮,则开始查找并在列表框中显示结果;按“清除”按钮,则将列表框清空。3程序中应定义一个名为prime 的函数过程。用于判断一个整整数是否为素数;定义一个名为 nx 的过程,用于求一个正整数的逆序数。要求 将窗体文件和工程文件分别命名为F2 和 P2,并保存到软盘A的根目录下。文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V

5、3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3

6、G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:C

7、P4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB

8、4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7

9、L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码

10、:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2

11、HB4V3P2E9C2 ZO7L3G10J5R6答案:改错:Option Explicit Private Sub Command1_Click()Dim i As Integer,st As String Dim n()As Integer,k As Integer For i=2 To 10 Call check(i,n)st=st&CStr(i)&3=&CStr(i 3)&=For k=1 To UBound(n)-1 st=st&Str(n(k)&+Next k st=st&Str(n(k)&vbCrLf Next i Text1=st End Sub Private Sub chec

12、k(ByVal n As Integer,a()As Integer)Dim sum As Integer,i As Integer,j As Integer Dim p As Integer n=n 3 For i=1 To n 2 Step 2 p=0 文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP

13、4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4

14、V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L

15、3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:

16、CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 H

17、B4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO

18、7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6For

19、 j=i To n Step 2 sum=sum+j p=p+1 ReDim Preserve a(p)a(p)=j If sum=n Then Exit Sub If sum n Then Exit For Next j Erase a sum=0 Next i End Sub 编程:Private Sub Command1_Click()Dim n As Long,m As Long For n=10001 To 99999 Step 2 m=nx(n)If prime(n)And prime(m)And m n Then List1.AddItem(&n&,&m&)End If Next

20、 n 文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9

21、T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P

22、2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G1

23、0J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4

24、Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V

25、3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3

26、G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6End Sub Private Function prime(n As Long)As Boolean Dim i As Integer For i=2 To Int(Sqr(n)If n Mod i=0 Then Exit Function End If

27、Next i prime=True End Function Private Function nx(n As Long)Dim p As Integer,s As String For p=1 To 5 s=Mid(n,p,1)&s Next p nx=Val(s)End Function Private Sub Command2_Click()List1.Clear End Sub 文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P

28、2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G1

29、0J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4

30、Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V

31、3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3

32、G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:C

33、P4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6文档编码:CP4Q9T9V5J2 HB4V3P2E9C2 ZO7L3G10J5R6

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁