江苏信息考试题组复习总结.doc

  1. 1、本文档共6页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
江苏信息考试题型 阶乘 Private Sub Command3_Click() Dim s As Single Dim i As Single Dim p As Single s = 0 p = 1 For i = 1 To 8 p = p * i s = s + p Next i Print s 斐波那契前二十放数组 Private Sub Command1_Click() Cls Dim a(20) As Integer Randomize a(1) = 1 a(2) = 1 For i = 3 To 20 a(i) = a(i - 1) + a(i - 2) Next i For i = 1 To 20 Print a(i) Next i End Sub Private Sub Command2_Click() Dim x As String Dim y As String x = Text1.Text y = For i = Len(x) To 1 Step -1 y = y Mid(x, i, 1) Next i Print y End Sub 大小写转换 Private Sub Command3_Click() Dim x As String Dim y As String Dim tenp As String x = Text1.Text y = For i = 1 To Len(x) y = y Chr(Asc(temp) - 32) Next i Print y End Sub 输入铁丝长度x,输出面积最大值 Private Sub Command3_Click() Dim x As Integer Dim a As Integer Dim b As Integer x = Val(InputBox(zhou chang)) Max = 0 For a = 1 To x \ 2 - 1 b = x \ 2 - a If a * b Max Then Max = a * b Next a Print Max End Sub 条件循环 利率0.05 原来2000 多少年变4000 Private Sub Command1_Click() s = 2000 n = 0 Do While s 4000或 until s=4000 s = s * 1.05 n = n + 1 Loop Print n End Sub 数组 Private Sub Command1_Click() Cls Dim x(10) As Integer Randomize For i = 1 To 10 x(i) = Int(100 * Rnd) Next i For i = 1 To 10 Print x(i) Next i s = 0 For i = i To 10 s = s + x(i) Next i Print and=, s Print dsh=, s / 10 End Sub 求一组数的最大最小值 Private Sub Command2_Click() Dim a(10) As Single For i = 1 To 10 a(i) = InputBox(x CStr(i) gs) Next i For i = 1 To 10 Print a(i) Next i Max = a(1) For i = 2 To 10 + 68 If a(i) Max Then Max = a(i) Next i Print Max Min = a(1) For i = 2 To 10 If a(i) Min Then Min = a(i) Print Min End Sub 10个一行 For i = 1 To 100 Print a(i); If i Mod 10 = 0 Then Print Next i 习题组 Private Sub Command1_Click() Dim x(9) As Single For i = 0 To 9 x(i) = Val(Text1(i)) Next i Max = x(0) Min = x(0) s = x(0) For i = 1 To 9 If x(i) Max Then Max = x(i) If x(i) Min Then Min = x(i) s = s + x(i) Next i s = (s - Max - Min) / 8 Label5.Caption = Max Label6.Caption

文档评论(0)

kbook + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档