数组比较大小

来源:百度知道 编辑:UC知道 时间:2024/05/31 13:28:13
用汇编语言:假设有一组数据5,-4,0,3,100,-51变一程序判断每个数是大于,小于,还是等于0,并输出判断结果

不会!刚写了VB的 研究研究!
n=cint(inputbox("你想研究多大的数组啊?请输入吧!"))
redim a(n)'给直自己写
for i=0 to ubound(a)
a(i)=inputbox(n&chr(13)&"输入吧!a("&i&")")
next
for i=0 to ubound(a)
for t=0 to ubound(a)
if i<>t then
if a(i)>a(t) then
word=word+"好神奇哦!a("&i&")大于a("&t&")耶"&chr(13)
elseif a(i)<a(t) then
word=word+"真神奇哦!a("&i&")竟然小于a("&t&")耶"&chr(13)
else
word=word+"真没趣!a("&i&")竟然等于a("&t&")耶"&chr(13)
end if
end if
next
next
msgbox word