當前位置:編程學習大全網 - 電腦編程 - 急急急急,壹道vb題,用盡量簡但的方式編程

急急急急,壹道vb題,用盡量簡但的方式編程

function maxSum(a() as integer,b() as integer,c() as integer) as integer

dim i%,m%,n%,K%,min%,temp%

dim t() as integer

i=ubound(a)

m=ubound(b)

n=ubound(c)

temp=0

min=i

if min>m then min=m

if min>n then min=n

redim t(min)

for k=0 to min

t(k)=a(k)+b(k)+c(k)

if temp<t(k) then temp=t(k)

next

maxSum=temp

for k=0 to min

if t(k)=maxSum then

debug.print a(k),b(k),c(k)

exit for

end if

end function

  • 上一篇:這是輸出12V4A直流電源,怎樣改成可調壓,電流可調電源,請詳細說明!謝謝
  • 下一篇:51單片機匯編語言中DEC指令問題:如果30H中為#00H,執行DEC 30H後,30H地址單元中是什麽?
  • copyright 2024編程學習大全網