how to concatenate two arrays
int[] z = x.Concat(y).ToArray();
how to concatenate two arrays
int[] z = x.Concat(y).ToArray();
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]; } }
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us