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
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
Explain the adodb.stream class?
what is the object hyrarchy in QTP for a web based application
What methods are used to create text files and open text files in the vbscript language?
1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.
How to create a function in vbscript?
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
How to replace junk code recorded by QTP with a mall function.
What is variant in vb script?
What are the different types of loops available in the vbscript language?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
What is difference between vbscript and vba?
Mention what are the rules to name variable in vbscript?
What if you do not specify anything when you call a procedure?