Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Testing
- {
- class Testing
- {
- static void Main()
- {
- int[] arr = new int[] { 10, 20, 30 };
- int[] arr2 = new int[] { 40, 50, 60 };
- List<int> res = new List<int>();
- for (int i = 0, j = 0; i < arr.Length;i++,j++)
- {
- res.Add(arr[i] + arr2[j]);
- }
- Console.WriteLine(string.Join(" ",res));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment