大哥大姐,
1、随机生成15个1到100之间的整数,然后将这组数由大到小排列.输出原数列与排列后的数列.
2、有一函数(函数式子在插图里面)建立一个函数M文件,分别输入自变量的值(0,1)、(-1,2),然后输出函数值.
1 Dim a(1 To 15)
Dim b(1 To 15)
Private Sub Form_Load()
Randomize
For i = 1 To 15
a(i) = Int(Rnd * 100 + 1)
Next i
For i = 1 To 15
b(i) = a(i)
Next i
k = 0
While k = 0
k = 1
For i = 1 To 14
p = i + 1
If a(i) < a(p) Then
v = a(i)
a(i) = a(p)
a(p) = v
k = 0
End If
Next i
Wend
MsgBox b(1) & "," & b(2) & "," & b(3) & "," & b(4) & "," & b(5) & "," & b(6) & "," & b(7) & "," & b(8) & "," & b(9) & "," & b(10) & "," & b(11) & "," & b(12) & "," & b(13) & "," & b(14) & "," & b(15)
MsgBox a(1) & "," & a(2) & "," & a(3) & "," & a(4) & "," & a(5) & "," & a(6) & "," & a(7) & "," & a(8) & "," & a(9) & "," & a(10) & "," & a(11) & "," & a(12) & "," & a(13) & "," & a(14) & "," & a(15)
End Sub
VB6.0实践可行
Function A(x,y)
If x > 0 And y > 0 Then
p = x * y
w = x * x + Sin(p) + 2 * y
Else
w = 0
End If
A = w
Exit Function
End Function
-
点赞数:0回答数:1
-
点赞数:0回答数:4
-
点赞数:0回答数:3
-
点赞数:0回答数:1
-
点赞数:0回答数:1
-
点赞数:0回答数:1
-
点赞数:0回答数:1
-
点赞数:0回答数:1
-
点赞数:0回答数:1
-
点赞数:0回答数:1

最新问答: 1.our eyes are the same size from birth.此处from 能换成as吗? 2.no — the keys?___ on the bed.A、Where is ,It's B、Where are ,They 问道英语问题This spacious room is ________ furnished with just a f 简便算法:7分之3×6分之1+7分之4×6分之5= 15+32×1.25%= 9分之5×13分之7÷(9分之7×2分之1 如果一条路有24米,每隔2米种一棵树,只种一端,而且只种一边,一共要种( )棵,如果种 月亮上的足迹记述的是1969年7月什么飞船成功登月这一事件 the clock ticks on翻译 请问在经济学中tradeoff 具体是什么意思 (2005•朝阳区一模)下列行为不会造成水污染的是( ) 已知圆C以(3,-1)为圆心,5为半径,过点S(0,4)作直线l与圆C交于不同两点A,B. 人体内钾离子钠离子作用 克雷洛夫寓言全集 燃气热水器耗气量一般为多少?一小时一般用几立方的气? 文言文“大方之家”的“大方”古意和今意是什么? 请问色彩艳丽灿烂夺目是神魔成语 水波忽明忽暗的样子 形容人来人往非常热闹 变成成语是啥 (2014•虹口区一模)某同学设计了一个测定油漆喷枪向外喷射油漆雾滴速度的实验.他采用如图(甲)所示的装置,该油漆喷枪能 如图所示的电路中,电源电压不变,电阻R1=20Ω.当开关S接位置1时,电流表的示数为0.6A;当开关S接位置2时,电流表 谁能我帮我翻译一下这段古文,选自《达庄论》。 六年级上册人教版数学第二单元分数简便算法练习题 见下 蔺相如是怎么向赵王分析以城易璧一事
栏目推荐: 拔苗助长歇后语 大学英语4答案 子午线是多少 卖是什么意思 万物复苏是什么意思 成本与可变现净值孰低法 1kw多少度电 五个字的古诗句 250是多少厘米 英语教学 便多音字组词 常用对数 考研英语真题 独出心裁 大学英语阅读理解试题 江畔独步作文 4除以4分之3等于多少 dig什么意思 冰淇淋怎么写 how to make .作文