Answers for "adding two arrays together"

C#
0

how to concatenate two arrays

int[] z = x.Concat(y).ToArray();
Posted by: Guest on June-14-2021
0

addition of two arrays

int[] a = {10, 20 30, 40}; int[] b = {25, 50, 75, 100, 125}; int[] sum = new int[b.length];  for (int i = 0; i <= b.length; i++){ 	sum[i] = 0;	 		/*initialize each of the sum values as zeroes, because that's 		what we usually start with*/ 		 	if (i > b.length){  		/*if one array is longer than the other, just add zero the  		remaining elements in the largest array*/ 		sum[i] = b[i] + 0; 	else{ 		sum[i] = a[i] + b[i]; 	} } 
Posted by: Guest on February-03-2021

Code answers related to "adding two arrays together"

C# Answers by Framework

Browse Popular Code Answers by Language