Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com Finding two or more matching largest values in an array.

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 07-10-2010, 11:50 AM PM User | #1 Hyp3r New to the CF scene   Join Date: Jul 2010 Location: England Posts: 9 Thanks: 4 Thanked 0 Times in 0 Posts Finding two or more matching largest values in an array. Hi I am currently writing a program to analyse (to a degree), the points scored in a dance contest. The program mainly works so far. However I am struggling to conclude the program end. Using an if statement, I would like to compute if a dance-off is required, looping through the combinedPointsArray and determining if 2 or more numbers hold the higest score and are equal. The aim is to provide:Maximum number of combined points The couples and their combined points The couples names with the highest points If two or more couples have equal highest combined points - output whether a dance-off is required. This is my program so far: Code: ``` Latin Dancing Contest

NamesCombined Points
``` Any help would be really appreciated. I have spent so long on this; consequently I am pulling my hair out. Regards hyp3r
 07-10-2010, 12:19 PM PM User | #2 Philip M Supreme Master coder!     Join Date: Jun 2002 Location: London, England Posts: 17,489 Thanks: 200 Thanked 2,471 Times in 2,449 Posts Have you tried the Search feature of this forum? We have done this homework already this semester. http://www.codingforums.com/showthread.php?t=198927 It is your responsibility to die() if necessary….. - PHP Manual
 Users who have thanked Philip M for this post: Hyp3r (07-10-2010)
 07-10-2010, 12:24 PM PM User | #3 Hyp3r New to the CF scene   Join Date: Jul 2010 Location: England Posts: 9 Thanks: 4 Thanked 0 Times in 0 Posts Thank you, I did try the search function but to no avail.
 07-10-2010, 12:32 PM PM User | #4 vwphillips Senior Coder   Join Date: Mar 2005 Location: Portsmouth UK Posts: 4,431 Thanks: 3 Thanked 481 Times in 468 Posts Code: ``` Latin Dancing Contest

NamesCombined Points
``` __________________ Vic God Loves You and will never love you less. http://www.vicsjavascripts.org.uk/ If my post has been useful please donate to http://www.operationsmile.org.uk/
 Users who have thanked vwphillips for this post: Hyp3r (07-10-2010)
 07-10-2010, 01:13 PM PM User | #5 Hyp3r New to the CF scene   Join Date: Jul 2010 Location: England Posts: 9 Thanks: 4 Thanked 0 Times in 0 Posts Although the 'homework' had been done before. I wanted to do it from scratch. You certainly don't learn anything by copying. Also I took the initiative to post the contestantsNamesArray + combinedPointsArray in a table. Much neater imo. Thanks for your help guys. p.s I don't mind admitting I'm a newbie at programming. Year 1 of my BSc computing and systems practice degree

 Bookmarks

 Tags arrays, javascript, values

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 05:22 PM.