Dim i As Integer, temp As Double, sum As Double
For i = 1 To 4
temp = InputBox("请输入第" & i & "个数")
sum = sum + temp
Next
Print "和为:" & sum & ",平均值为:" & sum / 4
End SubSub test()
Dim s As String
Dim i As Integer
Dim x() As String
Dim xSum As Single
s = InputBox("请输入3个数字,用分号(;)隔开:", "Hi")
x = Split(s, ";")
For i = 0 To 2
xSum = xSum + x(i)
Next
MsgBox "这三个数字的平均值为 " & xSum / 3
End Sub// end else if
my_mccat_visible =0;
dati = filexmlfirstChildchildNodes[categoriasito]childNodes;
for (i=0; i<datilength; i++) {
my_mccatduplicateMovieClip("cat"+i, i1+5000);
my_mc["cat"+i]loaderloadMovie(dati[i]attributesurlimage);
my_mc["cat"+i]input_txttext = dati[i]attributesdesc;
if (i<colonne) {
my_mc["cat"+i]_y = 0;
my_mc["cat"+i]_x = 105i+20;
} else {假定用Combo1、Combo2、Combo3这三个ComboBox来显示三个数字,求平均值:PrivateSubCommand_Click()'点击“平均值”按钮Label1Caption=(Val(Combo1Text)+Val(Combo1Text)+Val(Combo1Text))/3EndSub
VisualBasic60是微软公司开发的编程设计软件,基于Windows *** 作系统可视化编程环境。VisualBasic60还提供了窗口编辑,可直接对窗口进行编辑和预览。
VisualBasic60由标题栏、菜单栏、工具栏、工具箱、窗体窗口、工程窗口、属性窗口、窗体布局窗口等构成。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)