Looks like a neat problem.  Lets see:

<CFSCRIPT>

<!--- initialize the total variable to hold the sum of the array's
value --->
total = 0;

for(i = 1; i lt arrayLen(avgMark); i = i + 1){
        total = total + avgMark[i];
}

        average = total / arrayLen(avgMark);

</CFSCRIPT>

That should do it right?

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

> -----Original Message-----
> From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 24, 2002 2:15 PM
> To: CF-Talk
> Subject: Array questions
>
>
> If I define a 2 dimensional array with info in it like this:
>
> Element       Name    LowMark HighMark        AvgMark
> 1             Fred    22              88              45
> 2             Bob     55              96              83
>
> Is there a way to easily get the average of the average column
> (getting the
> lowest mark and highest should be easy with ArrayMin and ArrayMax), or
> would be better off with four single dimension arrays?
>
> T
>
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to