Miguel Posted April 17, 2008 Posted April 17, 2008 Could someone help me solve this question? (I´m Portuguese, sorry my bad English....) Dim $SumEx[4][4] = [[125, 379, 23, 530], [485, 160, 275, 320], [285, 180, 215, 12]] _ArrayDisplay($SumEx, "Need help") I have this array wich returns the following: [0]|125|379|23 |530 [1]|485|160|275|320 [2]|285|180|215|12 [3]| The question is: I can i do to place in the line [3] the sum of the numbers in each column? Thank you in advance.
Monamo Posted April 17, 2008 Posted April 17, 2008 Could someone help me solve this question? (I´m Portuguese, sorry my bad English....) Dim $SumEx[4][4] = [[125, 379, 23, 530], [485, 160, 275, 320], [285, 180, 215, 12]] _ArrayDisplay($SumEx, "Need help") I have this array wich returns the following: [0]|125|379|23 |530 [1]|485|160|275|320 [2]|285|180|215|12 [3]| The question is: I can i do to place in the line [3] the sum of the numbers in each column? Thank you in advance.$SumEx[3][0] = $SumEx[0][0] + $SumEx[1][0] + $SumEx[2][0] $SumEx[3][1] = $SumEx[0][1] + $SumEx[1][1] + $SumEx[2][1] $SumEx[3][2] = $SumEx[0][2] + $SumEx[1][2] + $SumEx[2][2] - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
weaponx Posted April 17, 2008 Posted April 17, 2008 #include <array.au3> Dim $SumEx[4][4] = [[125, 379, 23, 530], [485, 160, 275, 320], [285, 180, 215, 12]] ;Loop through each column For $X = 0 to 3 ;Loop through each row For $Y = 0 to 2 $SumEx[3][$X] += $SumEx[$Y][$X] Next Next _ArrayDisplay($SumEx, "Need help")
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