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 |
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
How will you convert a string to upper case string using vbscript?
What are the properties of regexp object?
Mention how to create a cookie using vbscript?
join all the array values without using join function?
What are the 2 ways in which a variable can be declared in the vbscript language?
What is the extension of the vbscript file?
write a vb script to find the size of d drive?
How do you write an SQL insert statement?
What is the difference between for loop and while loop?
Explain the scope of the variables using dim, public, and private keywords respectively.
How to find arry size in qtp vb script