1題是
'window.document.write(sum(1,1,1))
function sum(m,n,p)
sum=sum1_x(m)+sum1_x(n)/sum1_x(p)
end function
'window.document.write(sum1_x(2))
function sum1_x(x)
dim a
a=0
dim temp
dim i
for i=0 to x
a=a+i
'window.document.write(a)
next
sum1_x=a
end function
2題
s="asdf dfas fdasg fgd b gg aesf ga ga gfadfg agre adgf afgadfgad aggadf fag agf asfg afsd"
a=Split(s," ")
tmep=""
for i=LBound(a) to UBound(a)
if (len(a(i))>len(temp)) then
temp=a(i)
end if
'window.document.write(a(i))
next
window.document.write(temp)
如果在vb中window.document.write換成print