- 1、本文档共23页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1-40上机模拟试题答案
1~40套模拟试题的简单应用和综合应用的答案
一:
2(1): index n n+2 n f1
2(2): s s,s1 str(n)
3:
Private Sub C1_Click()
Dim x As Integer
x = 17999
Do While x 18000
If isprime(x) Then Exit Do
x = x - 1
Loop
Text1.Text = Str(x)
End Sub
Private Sub C2_Click()
Open App.Path \out5.txt For Output As 1
Print #1, Text1.Text
Close 1
End Sub
二:
2(1): check1.value “” “#” text2.text
2(2): 5 x str(x)
3:
Dim i As Integer, j As Integer, n As Integer
For i = 1 To 7
For j = 1 To 7
If i = 1 Or i = 7 Or j = 1 Or j = 7 Then
Sum = Sum + a(i, j)
If a(i, j) Mod 7 = 0 Then n = n + 1
End If
Next j
Next i
lblFirst.Caption = Str(n)
lblSecond.Caption = Str(Sum)
三:
2(1): or num
2(2):Avg is=85 is=60 end select n-1
3:
Dim b(20) As Single, i As Integer, j As Integer
Dim max As Integer
For i = 1 To 20
For j = 1 To 5
b(i) = b(i) + a(i, j)
Next j
b(i) = b(i) / 5
Next i
max = b(1)
For i = 2 To 20
If max b(i) Then max = b(i)
Next i
Text2.Text = Str(max)
四:
2(1):true abc n form1 form2
2(2):0 sellength t text2.text
3:
For k = 1 To 100
If a(k) Mod 3 = 0 Then
num = num + 1
b(num) = a(k)
End If
Next k
For i = 1 To num - 1
For j = i + 1 To num
If b(i) b(j) Then
t = b(i)
b(i) = b(j)
b(j) = t
End If
Next j
Next i
五:
2(1): x y
2(2):list1,list2 l1.text l1.listindex list1.listcount-1
3:
For i = 1 To n
For j = 1 To n
If i = j Or i + j = 8 Then
If a(i, j) Mod 3 = 0 Then Counter = Counter + 1
End If
If i = j Then Sum = Sum + a(i, j)
Next j
Next i
lblFirst.Caption = Str(
文档评论(0)