Algorithms/Find maximum/java script method 6
< Algorithms < Find maximum<script language="javascript"> function findMaxFourEle(i_intA,i_intB,i_intC,i_intD) { var o_intMax = i_intA; if ( i_intB > o_intMax ) o_intMax = i_intB; if ( i_intC > o_intMax ) o_intMax = i_intC; if ( i_intD > o_intMax ) o_intMax = i_intD; return o_intMax; } // end method function findMaxThreeEle(i_intA,i_intB,i_intC) { return findMaxFourEle(i_intA,i_intB,i_intC,i_intC); } // end method document.write(findMaxThreeEle(3,4,5)); </script>
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.