![](https://lstatic.shangxueba.com/sxbzda/h5/images/m_q_title.png)
要解决“重生产,轻安全”的现象,除了国家加强行政监督和法律惩处外,最重要的是()。
A.提高劳动者的素质,增强安全生产意识
B.改变我国劳动力供过于求的局面
C.提高企业经营者的职业道德水平和法制观念
D.建立和完善社会保障制度
![](https://lstatic.shangxueba.com/sxbzda/h5/images/tips_org.png)
A.提高劳动者的素质,增强安全生产意识
B.改变我国劳动力供过于求的局面
C.提高企业经营者的职业道德水平和法制观念
D.建立和完善社会保障制度
第1题
●试题六
阅读以下应用说明及Visual Basic部分程序代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
单击窗体上的"测试"(cmdTest)按钮,出现一个输入框,要求输入一串字符,将该字符串中的非字母字符删除后,显示在窗体中的一个文本框(txtShow)中。
【程序代码】
Private Sub cmdTest_Click()
Dim strT1,strT2 As String
Dim strCh As (1)
Dim intL As Integer
Dim intI As Integer
strT1= (2) ("请输入一串字符","字符串输入")
intL= (3)
strT2=″″
For intI=l To intL
strCh=Mid(strT1,intI,1)
If(strCh>"A"And (4) ) Or (strCh>"a" And suCh<"z")Then
strT2=strT2+strCh
End If
Next intI
txtShow.Text= (5)
End sub
第2题
试题三(共 15 分)
阅读以下说明和 C 程序,将应填入 (n) 处的字句写在答题纸的对应栏内。
第3题
●试题五
阅读以下应用说明、属性设置及Visual Basic程序代码,将应填入(n)处在字句写在答题纸的对应栏内。
【说明】
本应用程序的运行窗口如图2所示。
只要用户单击"闪烁"按钮,文字"欢迎光临"就会以0.3秒消失、0.3秒显示反复进行闪烁;单击"停止"按钮时,闪烁停止,恢复图示的初态。
在开发过程中,需要设置的属性如表1所示。
在开发过程中,需要编写的程序代码如下:
【程序】
Private Sub CmdF_Click()
Timer1. (3) =True
Labe1.Visible=False
End Sub
Private Sub Timer1_Timer()
(4) =not Label.Visible
End Sub
Private Sub CmdT_Click()
Timer1.Enabled= (5)
Labe1.Visible=true
End Sub
第4题
阅读以下说明及Visual Basic程序代码,将应填入(n)处的字句写在对应栏内。
【说明】
以下程序为求行列式X(5,5)的值S。
【Visual Basic代码】
Private Function col (byval x (5,5 ) as integer ) as long
dim fesult as long
dim temp as long
dim I as integer
dim j as integer
dim k as imeger
result = 0
for I = to 5
(1)
for j = 1 to 5
if I+j>6 then
k= (1+j ) mod 5
else
k=1
endif
temp=temp*x (k,j )
(2)
result=(3)
(4)
(5)
End function
第5题
●试题五
阅读以下应用说明及Visual Basic部分程序代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
在窗体上画一个名称为Combo1的组合框,画两个名称分别Label1、Label2及Caption属性分别为"城市名称"和空白的标签。程序运行后,当在组合框中输入一个新项后按回车键(ASCII码为13)时,如果输入的项在组合框的列表中不存在,则自动添加到组合框的列表中,并在Label2中给出提示"已成功添加输入项";如果存在,则在Label2中给出提示"输入项已在组合框中"。
【程序】
Private Sub Combo1_ (1) (KeyAscii As Integer)
If KeyAscii= (2) Then
For i=0 To (3)
If Combo1.Text= (4) Then
Label2.Caption="输入项已在组合框中"
Exit Sub
End If
Next i
Label2.Caption="已成功添加输入项"
Combo1. (5) Combo1.Text
End If
End Sub
第6题
●试题八
阅读以下说明及Visual Basic部分程序代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
本程序是一个可进行数制转换的应用程序,图1所示是其运行界面。txtDec为TextBox控件名,Lblkes为转换结果labe1控件名。
【程序代码】
Option Explicit
Private Function convert(pintDec As Intege,pintS As Integer)As String
Dim intCt As Integer,intR As Integer
Dim strCov As String,strRes As String
intR=pintDec Mod pintS
Do While (1)
strCov=strCov & Str(intR)
(2)
intR=pintDec Mod pintS
Loop
For intCt= (3) To 1 Step-1
strRes=strRes & Mid(strCov,intCt,1)
Next intCt
convert=strRes
End Function
Private Sub cmdQuit_Click()′退出
Unload Me
End Sub
Private Sub optBin_Click()′二进制
lblRes.Caption="转换结果:"& (4)
End Sub
Private Sub optHex_Click()′十六进制
lblRes.Caption="转换结果:"& (5)
End Sub
Private Sub optOct_Click()′八进制
lblRes.Caption="转换结果:"&Oct(Val(txtDe
C.Text))
End Sub
第7题
阅读以下说明及Visual Basic 程序代码,将应填入(n)处的字句写在对应栏内。
[说明]
本程序求3~100之间的所有素数(质数)并统计个数;同时将这些素数从小到大依次写入顺序文件E: \dataout.txt;素数的个数显示在窗体Form1上。
[Visual Basic 代码]
Private Sub Command1_ Click ()
Dim count as integer, flag as Boolean
Dim t1 as Integer, t2 as Integer
(1)
Count=0
For t1=3 to 100
Flag=Tree
For t2=2 to Int(Sqr (t1 ) )
If (2) Then flag=False
Next t2
(3)
count=(4)
write 1, t1
End if
Next t1
(5)
Close 1
End Sub
第8题
●试题八
阅读以下应用说明及Visual Basic部分程序代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
该应用程序是用来修改文本框中的字体属性,其运行窗口如图4所示。
窗口由1个标签(Labell)、1个文本框(txtPassage)和4个选择框(chkFont,chkltalic,chkSize,chkColor)组成。程序运行后,用户在文本框内输入一段文字,然后按需要单击各选择框,用以改变文本的字体、字型、颜色及大小。
文本框的Mulitine属性已经设为True。当不选择"黑体"时,文字应是"宋体"。当不选择"大小16"时,字号为9。当不选择"紫色"时,字色为黑色。当不选择"斜体"时,文字采用正常字型。
【程序代码】
Private Sub chkFont Click()
If (1) Then
txtPassage.FontName="黑体"
Else
txtPassage.FontName="宋体"
End If
End Sub
Private Sub (2) ()
If chkColor.Value=1 Then
txtPassage.ForeColor=QBColor (13)
Else
txtPassage.ForeColor=QBColor(0)
End If
End Sub
Private Sub chkltalic_Click()
If chkltalic.
Value=1 Then
txtPassage.FontI talic= (3)
Else
txtPassage.FontItalic= (4)
End If
End Sub
Private Sub chkSize_Click()
If (5) Then
txtPassage.Font.Size=16
Else
txtPassage.Font.Size=9
End If
End Sub
第9题
●试题一
阅读下列说明和流程图,将应填入(n)的字句写在答题纸的对应栏内。
【说明】
下列流程图(如图4所示)用泰勒(Taylor)展开式
sinx=x-x3/3!+x5/5!-x7/7!+…+(-1)n×x 2n+1/(2n+1)!+…
【流程图】
图4
计算并打印sinx的近似值。其中用ε(>0)表示误差要求。
第10题
阅读以下应用说明及Visual Basic程序代码,将应填入(n)处的字句写在对应栏内。
【说明】
已知窗体上有两个名为cmdGene和cmdSort的命令按钮。单击cmdCene按钮时,随机产生10个[1,100]范围内的整数并将它们放在数组intA中;单击cmdSort按钮时,用选择法排序这10个数并输出。
【程序代码】
Dim intA(1 To 10)As integer
Private Sub cmdGene_Click()
Dim intl As Integer
Randomize
For intl = 1 To 10
intA(intl) =(1)
Next intl
End Sub
Private Sub cmdSort_Click()
Dim intl, intJ,intMin, intTemp As Integer
For intl = 1 To 9
intMin = intA(intl)
For intJ=(2) To 10
If intA(intJ) < intMin Then
Temp = intA(intJ)
intA(intJ)=(3)
intMin = intTemp
End If
Next intJ
(4)
(5)
For intl = 1 To 10
Print Str(intA(intl))+" ";
Next intl
Next lntl
End Sub
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!