收藏 分销(赏)

福建省计算机二级VB编程题.doc

上传人:精*** 文档编号:2765216 上传时间:2024-06-05 格式:DOC 页数:8 大小:489.01KB
下载 相关 举报
福建省计算机二级VB编程题.doc_第1页
第1页 / 共8页
福建省计算机二级VB编程题.doc_第2页
第2页 / 共8页
福建省计算机二级VB编程题.doc_第3页
第3页 / 共8页
福建省计算机二级VB编程题.doc_第4页
第4页 / 共8页
福建省计算机二级VB编程题.doc_第5页
第5页 / 共8页
点击查看更多>>
资源描述

1、编程题【1】 26-01N = Val(Text1.Text) Select Case N Case 80 To 100 Text2.Text = 优良 Case 60 To 79 Text2.Text = 合格 Case 0 To 59 Text2.Text = 不合格 End Select【2】 25-01Dim i%, s& N = Val(Text1.Text) s = 0 For i = 1 To N If i Mod 2 = 0 Then s = s + i Next i Text2.Text = Str(s)【3】 24-01Dim i As Integer N = Val(Te

2、xt1.Text) Text2.Text = For i = N To 1000 If i Mod 8 = 1 Then Text2.Text = Text2.Text & i & Next i【4】 23-01Dim i As Integer s = 0 N = Val(Text1.Text) For i = 1 To N s = s + i i Next i Text2.Text = s【5】 22-01Dim i%, n%, a As String * 1 n = 0 For i = 1 To Len(Text1.Text) a = Mid(Text1.Text, i, 1) If a

3、= 0 And a = 0 Then Text4.Text = 实数解 Else Text4.Text = 复数解 End If【7】 20-01N!S=1For i=1 to nS=s*iNext i1+1!+2!+3!+。+n!Dim i%, t&,n%,s&n=val(text1.text)t=1s=1For i=1 to ns=s*it=t+1.0/sNext iDim i As Integer, j As Integer, s As Long N = Val(Text1.Text) Text2.Text = Str(e)【8】 19-01Dim N As Integer, s As

4、Single 保留 Dim i% N = Val(Text1.Text) s = 0 For i = 1 To N s = s + (-1) (i + 1) / i Next i Text2.Text = Str(s)【9】 18-01Dim i% Text1.Text = For i = 100 To 200 If i Mod 3 = 0 And i Mod 6 0 Then Text1.Text = Text1.Text & i & Next i【10】 17-01Dim A(1 To 20) As Integer, i As Integer Text1.Text = Text2.Text

5、 = Randomize For i = 1 To 20 A(i) = Int(Rnd * 90 + 10) Text1.Text = Text1.Text & A(i) & Text2.Text = Text2.Text & IIf(A(i) = 65 And A(i) = 90, Chr(A(i) & , ) Next i【11】 27-02Private Sub Command1_Click()不得删改本行注释 Randomize Text1.Text = Int(Rnd * 9000 + 1000)End SubPrivate Sub Command2_Click()不得删改本行注释

6、Dim i%, s% s = 0 For i = 1 To Len(Text1.Text) s = s + Val(Mid(Text1.Text, i, 1) Next i Text2.Text = Str(s)End Sub【12】 23-02Private Sub Command1_Click()不得删改本行注释 Dim i As Integer Text2.Text = For i = 1 To Len(Text1.Text) Text2.Text = Mid(Text1.Text, i, 1) & Text2.Text Next iEnd Sub【13】 22-02Private Su

7、b command1_click()不得删改本行注释 Dim i%, chr As String * 1 Text3.Text = For i = 1 To Len(Text1.Text) chr = Mid(Text1.Text, i, 1) If chr Text2.Text Then Text3.Text = Text3.Text & chr或者 If chr = Text2.Text Then Text3.Text = Replace(Text1.Text, chr, ) Next iEnd Sub27-01Dim i% Dim n% n = Val(Text1.Text) For i = 1 To n Label2.Caption = Label2.Caption + Sjzf Next i Function Sjzf() As String Dim k As Integer Randomize k = Int(Rnd * 2) If k = 0 Then Sjzf = Chr$(Int(Rnd * 26) + 65) Else Sjzf = Chr$(Int(Rnd * 26) + 97) End IfEnd Function8

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 通信科技 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服