Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


a function that takes an integer array as an argument and
returns the largest value in the array. Use the function in
a program



a function that takes an integer array as an argument and returns the largest value in the array. ..

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

Post New Answer

More VB Script Interview Questions

When to use function procedures and what are its characteristics?

0 Answers  


Difference between Do while loop and while wend loop

1 Answers  


Explain the extension .hta?

0 Answers  


print the array values in ascending order?

2 Answers   CSS Corp,


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

0 Answers  


hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..

6 Answers  


How to open excel in vb script?

0 Answers  


Write a code to print numbers from 5 to 0?

0 Answers  


how to set one column as primary key in QTP and fetch values accordingly

0 Answers   Ford,


What are the properties of regexp object?

0 Answers  


How to get the background color of a weblist?

3 Answers   Accenture,


Mention the environments where vbscript could be run?

0 Answers  


Categories