[计算机类试卷]VB机试章节练习试卷88及答案与解析.doc

上传人:lawfemale396 文档编号:493987 上传时间:2018-11-28 格式:DOC 页数:4 大小:193.50KB
下载 相关 举报
[计算机类试卷]VB机试章节练习试卷88及答案与解析.doc_第1页
第1页 / 共4页
[计算机类试卷]VB机试章节练习试卷88及答案与解析.doc_第2页
第2页 / 共4页
[计算机类试卷]VB机试章节练习试卷88及答案与解析.doc_第3页
第3页 / 共4页
[计算机类试卷]VB机试章节练习试卷88及答案与解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、VB机试章节练习试卷 88及答案与解析 一、综合应用题( 30分) 1 在窗体 Form1上建立 3个菜单 (名称分别为 vbRead、 vbCalc和 vbSave,标题分别为 “读数 ”、 “计算 ”和 “存盘 ”),然后绘制一个文本框 (名称为 Text1, MultiLine属性设置为 True, ScrollBars属性设置为 2),如下图所示。 程序运行后,如果执行 “读数 ”命令,则读入 in45.txt文件中的 100个整数,放入一个数组中,数组的下界为 1;如果执行 “计算 ”命令,则把该数组中下标为奇数的元素在文本框中显示出来,求出它 们的和,并把所求得的和在窗体上显示出来

2、如果执行 “存盘 ”命令,则把所求得的和存入考生文件夹下的 out45.txt文件中。 在考生文件夹下有一个工程文件 execise45.vbp,考生可以装入该文件。窗体文件 execise45.frm中的 ReadData过程可以把 in45.txt文件中的 100个整数读入 Arr数组中;而 WriteData过程可以把指定的整数值写到考生文件夹指定的文件中 (整数值通过计算求得,文件名为 out45.txt)。 注意: 考生不得修改窗体文件中已经存在的程序。存盘时,工程文件名仍为 execise45.vbp,窗体文件名仍为 execise45.frm。 2 在名为 Form1的窗体上建

3、立一个名为 Text1的文本框,将 MultiLine属性设置为Tree, ScrollBars属性设置为 2。再建立两个名称分别为 Cmd1和 Cmd2的命令按钮,标题分别为 Read和 Save,如下图所示。 程序运行后,如果单击 Read按钮,则读入 in46.txt文件中的 100个整数,放入一个数组中 (数组下界为 1),并在文本框 Text1中显示出来;如果单击 “保存数据 ”按钮,则把数组中的前 50个数据在文本框 Text1中显示出来,并存入考生文件夹中的文件 out46.txt中 (考生文件夹中有标准模块 prog.bas,其中的 putdata过程可以把指定个数的数组元素存入 out46.txt文件,考生可以把该模块文件添加到自己的工程中 )。 注意: 文件必须存放在考生文件夹中,窗体文件名为 execise46.frm,工程文件 名为 execise46.vbp。结果存入out46.txt文件,否则没有成绩。 VB机试章节练习试卷 88答案与解析 一、综合应用题( 30分) 1 【正确答案】 2 【正确答案】

展开阅读全文
相关资源
猜你喜欢
  • ASD-STAN PREN 4827-2018 Aerospace series Hexavalent chromium free anodizing of aluminium and aluminium alloys (Edition P 2).pdf ASD-STAN PREN 4827-2018 Aerospace series Hexavalent chromium free anodizing of aluminium and aluminium alloys (Edition P 2).pdf
  • ASD-STAN PREN 4830-001-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 001 Technical specification (Edition P 1.pdf ASD-STAN PREN 4830-001-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 001 Technical specification (Edition P 1.pdf
  • ASD-STAN PREN 4830-002-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 002 Specification of performance (Editio.pdf ASD-STAN PREN 4830-002-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 002 Specification of performance (Editio.pdf
  • ASD-STAN PREN 4830-003-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 003 Module Product standard (Edition P 1.pdf ASD-STAN PREN 4830-003-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 003 Module Product standard (Edition P 1.pdf
  • ASD-STAN PREN 4830-004-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 004 Extraction tool Product standard.pdf ASD-STAN PREN 4830-004-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 004 Extraction tool Product standard.pdf
  • ASD-STAN PREN 4832-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ringlocked fitting and Ring-locked fitting-reducer - Inch Series - Technical sp.pdf ASD-STAN PREN 4832-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ringlocked fitting and Ring-locked fitting-reducer - Inch Series - Technical sp.pdf
  • ASD-STAN PREN 4833-2017 Aerospace series - Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ring locked fitting - Flareless End - Inch Series - Extra Fine Thread Pitch (Edition P1.pdf ASD-STAN PREN 4833-2017 Aerospace series - Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ring locked fitting - Flareless End - Inch Series - Extra Fine Thread Pitch (Edition P1.pdf
  • ASD-STAN PREN 4834-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Port for Ring locked fitting - Inch Series - Geometric configuration (Edition P.pdf ASD-STAN PREN 4834-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Port for Ring locked fitting - Inch Series - Geometric configuration (Edition P.pdf
  • ASD-STAN PREN 4835-2017 Aerospace series - Installation and removal requirements for Ring locked fitting and reducer 24 one up to 35 000 kPa (5 080 psi) - Inch Series (Edition P1).pdf ASD-STAN PREN 4835-2017 Aerospace series - Installation and removal requirements for Ring locked fitting and reducer 24 one up to 35 000 kPa (5 080 psi) - Inch Series (Edition P1).pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1