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

Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.

3 Answers   Amazon,


How will you convert a string to upper case string using vbscript?

0 Answers  


What are the properties of regexp object?

0 Answers  


Mention how to create a cookie using vbscript?

0 Answers  


join all the array values without using join function?

1 Answers   CSS Corp,


What are the 2 ways in which a variable can be declared in the vbscript language?

0 Answers  


What is the extension of the vbscript file?

0 Answers  


write a vb script to find the size of d drive?

3 Answers  


How do you write an SQL insert statement?

4 Answers   HCL,


What is the difference between for loop and while loop?

0 Answers  


Explain the scope of the variables using dim, public, and private keywords respectively.

0 Answers  


How to find arry size in qtp vb script

2 Answers   Cap Gemini,


Categories