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 / 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 |
What is the main difference between function and sub-procedure?
How to Import data from a file (file is on the desktop) to the data table
Write a program to print all lines that contains a word either “testing” or “qtp”
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
which one is more secure vb script or java script ??????? or both are same ??????
Mention what is select case statement?
how to check whether link is disabled in QTP??
How to create a cookie using vbscript?
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
What if you do not specify anything when you call a procedure?
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
Inorder to avoid Message box while writing script which alternative method can be used?