福建省计算机二级VB编程题(共8页).doc

上传人:飞****2 文档编号:13957296 上传时间:2022-05-02 格式:DOC 页数:8 大小:468KB
返回 下载 相关 举报
福建省计算机二级VB编程题(共8页).doc_第1页
第1页 / 共8页
福建省计算机二级VB编程题(共8页).doc_第2页
第2页 / 共8页
点击查看更多>>
资源描述

《福建省计算机二级VB编程题(共8页).doc》由会员分享,可在线阅读,更多相关《福建省计算机二级VB编程题(共8页).doc(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

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 Integ

2、er N = Val(Text1.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

3、, i, 1) If a = 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 I

4、nteger, s As 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

5、 = Text2.Text = 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_Cli

6、ck()不得删改本行注释 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

7、-02Private Sub 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 Function专心-专注-专业

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

当前位置:首页 > 教育专区 > 教案示例

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

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