a function that takes an integer array as an argument and
returns the largest value in the array. Use the function in
a program
Answer Posted / abd al-ala camara
<?php
// define function largest()
function largest($numbers) {
foreach ($numbers as $temp) {
$largestNumber = max($numbers);
}
return $largestNumber;
} // end function
$numbers = array(3, 45, 2, 56, 7, 9, 78, 23, 63);
echo largest($numbers); // if you want you can echo or just
use it another function or programe
?>
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Compare java script and vb script?
Explain about scrrun.dll in vbscript?
Mention how you can call vbscript functions?
can anyone tell me the procedure of interview held in applabs
What is the technology used by vb script?
Explain the .wsf files?
What methods are used to create text files and open text files in the vbscript language?
what is the differance between BYVAL,BYREF?
What is the use of option explicit statement?
write a program to display configuration of a local system with the help of vb script.
Can anyone send me a vb script function for verifying the functionality of active links on a web page
Explain vbscript in detail?
What are the disadvantages of vbscript?
How to assign a numeric value to a variable?
How to access array data?