网站大量收购闲置独家精品文档,联系QQ:2885784924

河北工业大学vb重点题.doc

  1. 1、本文档共4页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
河北工业大学vb重点题

北京市、上海市、天津市、河北省 Private Sub form-Click() Static a As Integer a=a+1 Select Case a Case 1 Form1.Caption=“北京市” Case2 Form1.Caption=“上海市” Case3 Form1.Caption=“天津市” Case4 Form1.Caption=“河北省” a=0 End Select End Sub 7.1+2+3+。。。+10 Dim s as double For i=1 to 10 S=s+i^i Next i Print s 8.窗体上显示1到15的奇数 For i =1 to 15 If i mod 2= 1 then Print i End If Next i 编程实现九九乘法表 Dim I As integer,j as integer For i= 1 to 9 For j=1 to I Print j ; “x” ; i ; ”=” ; I *j. Next j Print Next i 找出二维数组中每一行最大的元素 Dim a(2,3) as integer ,max(2) as integer For I =o to 3 a(i,j)=Val(inputbox(“input number”)) print a( i,j) next j print next i for i=0 to 2 max(i)=a(i,0) for j =1 to 3 if a(i,j)max(i) then max(i)=a(i,j) End if Next i For i=0to 2 Print max(i) Next i 编程将一维数组a(10)中数组元素循环向后移动一个位置,最后一个元素移到第一个元素位置上 Dim a(10) as integer,t as integer For i=0 to 10 A(i)=i Print a (i); Next i Print T=a(10) For i= 10 to 1 step-1 A(i)=a(i-1) Next i A(0)=t For i= 0 to 10 Print a (i); Next i 1*2*3+2)3)4+。。。+n*(n+1)*(n+2) Private sub command1- click() Dim I as integer,n as integer Dim sum as integer,s as integer N=inputbox(“请输入n的值”) For i=1 to n S=i*(i+1)*(i+2) Sum=sum+s Next i Print sum End sub 计算分段函数的值 Private sub command3-click() Dim n as integer,y as integer N=inputbox(“请输入n的值”) If n0 then Y=3*n+2 Elself n0zhen y=2)n-1 Elself n= 0 then Y=0 End if Print y End sub 北京市、上海市、天津市、河北省 Private Sub form-Click() Static a As Integer a=a+1 Select Case a Case 1 Form1.Caption=“北京市” Case2 Form1.Caption=“上海市” Case3 Form1.Caption=“天津市” Case4 Form1.Caption=“河北省” a=0 End Select End Sub 7.1+2+3+。。。+10 Dim s as double For i=1 to 10 S=s+i^i Next i Print s 8.窗体上显示1到15的奇数 For i =1 to 15 If i mod 2= 1 then Print i End If Next i 编程实现九九乘法表 Dim I As integer,j as integer For i= 1 to 9 For j=1 to I Print j ; “x” ; i ; ”=” ; I *j. Next j Print Next i 找出二维数组中每一行最大的元素 Dim a(2,3) as integer ,max(2) as integer For I =o to 3 a(i,j)=Val(inputbox(“input number”)) print a( i,j) next j print next i for i=0 to 2 max(i)=a(i,0) for j =1 to 3

文档评论(0)

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

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

1亿VIP精品文档

相关文档