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 regexp.execute method works?
How to replace junk code recorded by QTP with a mall function.
Explain vbscript in detail?
What is the purpose of regexp object in vbscript?
Mention when to use function procedures and what are its characteristics?
Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP
What is variant in vb script?
Which function is used in the vbscript language to convert the specified expression into a date type value?
Differentiate javascript and vbscript?
what is diff between static and dynaic arrys?
Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble
What is sql loader? Explain the files used by sql loader to load file?
Explain the functionality of vbscript?
Mention what is vbscript procedures?
How will you get the exponent of the given number in vbscript?