If I have 3 NSMutableArray’s, how can I get an array where the element at each index is the sum of the elements at that same index in each of the original arrays?
Example:
MutableArrayOne = [NSMutableArray arrayWithObjects:@"1",@"2",@"3",@"4",@"5", nil];
MutableArrayTwo = [NSMutableArray arrayWithObjects:@"1",@"2",@"3",@"4",@"5", nil];
MutableArrayThree = [NSMutableArray arrayWithObjects:@"1",@"2",@"3",@"4",@"5", nil];
How do I sum them to an array like:
MutableArrayThree = [NSMutableArray arrayWithObjects:@"3",@"6",@"9",@"12",@"15", nil];
Assuming all arrays are of the same size…