DigitalLocksmith Posted July 13, 2007 Posted July 13, 2007 (edited) How do I find the total and the average of all values in an array? *edit* Nevermind...Figured it out. CODE#include <Array.au3> Dim $avArray[11], $I = 1 $total = 0 ; Populate test array. For $I = 1 to UBound( $avArray ) - 1 $avArray[$I] = Int( Random( 1, 2 ) ) $total = $total + $avArray[$I] Next _ArrayDisplay( $avArray, "_ArrayToString() Test" ) MsgBox( 4096, "Test", $total) Exit Edited July 13, 2007 by DigitalLocksmith
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now