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

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


Please Help Members By Posting Answers For Below Questions

How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

2968


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

981


Explain the adodb.stream class?

929


what is the object hyrarchy in QTP for a web based application

2309


What methods are used to create text files and open text files in the vbscript language?

923


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.

1947


How to create a function in vbscript?

1136


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

1433


How to replace junk code recorded by QTP with a mall function.

2011


What is variant in vb script?

1088


What are the different types of loops available in the vbscript language?

931


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1835


What is difference between vbscript and vba?

1113


Mention what are the rules to name variable in vbscript?

956


What if you do not specify anything when you call a procedure?

1045