Dim x(100), a For i = 1 To 100 x(i) = i Next i For Each a In x() s = s
题目
Dim x(100), a For i = 1 To 100 x(i) = i Next i For Each a In x() s = s
s = s + a
Next
Label1.Caption = s
Static n As Integer, m As Integer
m = 100: n = 0: s = 0
For Each x In a
If x > n Then n = x
If x < m Then m = x
s = s + x
Next
MsgBox "最大值为:" & n & Chr(13) & "最小值为:" & m & Chr(13) & "平均值为:" & s / 10
答案
Dim x(1 To 100),a,sFor i = 1 To 100x(i) = iNext iFor Each a In xs = s + aNextLabel1.Caption = sDim n As Integer,m As Integerm = 100:n = 0:s = 0For Each a In xIf a > n Then n = aIf a < m Then m = as = ...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
热门考点
- 重48.06N的铜块.完全浸没在水中.收到的浮力多大.(P铜=8.9*10的3次方kg/m的3次方,g取10N/kg)
- 关于螯合物和简单配合物的问题
- 一根重1000N,粗细均匀的铁棒长1.2米,平放在地面上,有人想把它竖立起来,在抬起过程中至少需用 牛的力,做 焦的功.
- some other people had parked their in the place in font of his garden
- 英语翻译
- ( )五()六的成语.例如:不三不四,横七竖八
- 桌子上有花吗?英语翻译、
- 已知函数F(X)=(M-1)X平方+3X+(2-N)为奇函数,求MN
- 帮我写一篇高一英语作文,我参考一下.
- 以字母T和K开头的英文单词(要求是比乒乓球还小的东西),