Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Algorithms/Find maximum/vb script method 1

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

function findMax(aa) Dim o_intMax o_intMax = aa(0) for each p_intJ in aa if p_intJ > o_intMax then o_intMax = p_intJ end if next findMax = o_intMax end function Dim cc(3) cc(0) = 3 cc(1) = 6 cc(2) = 5 cc(3) = 1 document.write("Max is " & findMax(cc) )