- 1、本文档共4页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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
您可能关注的文档
- 柴油化验设备简介-泰能仪器.doc
- 标准化或差异化.doc
- 标准德育答辩.doc
- 标准日本语第42课笔记.doc
- 某项目工程质量优势展示.doc
- 标准申论范文一篇:用法治塑造诚信社会.doc
- 栗换2112年暑期实践述职报告1.doc
- 标杆网点发言稿.doc
- 校园导游咨询2.doc
- 校园诗会.doc
- 2025-2030年中国冲压落料机行业深度研究分析报告.docx
- 2025-2030年中国智能卡读写机项目投资可行性研究分析报告.docx
- 2025-2030年中国踏板轴行业深度研究分析报告.docx
- 2025-2030年中国光离子化检测仪项目投资可行性研究分析报告.docx
- 2025-2030年中国园艺木桶行业深度研究分析报告.docx
- 2025-2030年中国陶瓷制品瓷砖行业深度研究分析报告.docx
- 2025-2030年中国霹雳扫描灯行业深度研究分析报告.docx
- 2025-2030年中国自救呼吸器项目投资可行性研究分析报告.docx
- 2025-2030年中国龙形分鱼刀叉连盘行业深度研究分析报告.docx
- 2025-2030年中国江波必利颗粒项目投资可行性研究分析报告.docx
最近下载
- 育才三中(初二年级)校本课程开设安排表2007.3.doc
- 古诗词诵读 《客至》 课件(共26张PPT)统编版高中语文选择性必修下册.pptx VIP
- 《中医学》教学大纲.docx VIP
- 2022《真希望我父母读过这本书》读后感.docx VIP
- 真希望我父母读过这本书精品课件模板.pptx VIP
- 2025年湘潭医卫职业技术学院单招面试模拟试题及答案解析.docx
- 污水处理中的污泥脱水浓缩技术考核试卷.docx VIP
- 我真希望我父母读过这本书读后感.docx VIP
- 2024年湖南城建职业技术学院单招职业技能测试题库(考试直接用).docx VIP
- DB62T 4919-2024苜蓿草高水分打捆技术规程.pdf VIP
文档评论(0)