option base 1
dim i as ingeter,j as integer,q as ingeter,a(100) as integer,b(100) as integer
dim c(100) as integer,t as integer
for i=1 to 100
a(i)=val(inputbox("输入0到100之间的数字"))
next i
b(1)=0
t=1
for i=1 to 100
for j=1 to t
if b(j)=a(i) then
c(j)=c(j)+1
exit for
end if
next j
if j=t+1 then
b(t)=a(i)
t=t+1
end if
next i
j=c(1)
for i=2 to t-1
if max<c(i) then
j=c(i)
q=i
end if
next i
j为最高次数,b(q)为那个数字
dim i as ingeter,j as integer,q as ingeter,a(100) as integer,b(100) as integer
dim c(100) as integer,t as integer
for i=1 to 100
a(i)=val(inputbox("输入0到100之间的数字"))
next i
b(1)=0
t=1
for i=1 to 100
for j=1 to t
if b(j)=a(i) then
c(j)=c(j)+1
exit for
end if
next j
if j=t+1 then
b(t)=a(i)
t=t+1
end if
next i
j=c(1)
for i=2 to t-1
if max<c(i) then
j=c(i)
q=i
end if
next i
j为最高次数,b(q)为那个数字