Hey all,
I am having a problem with summation of two array's indexes.
My requirement is as follow:-
I have declared 3 arrays and i accepted values in two arrays from user.
now i am adding the indexes of both of the arrays having values and putting the values in third array but however its not giving desired result:-
i have attached the code file as code.zip

Ajander Singh28 pointsPosted Oct 15, 2015, 11:29 PM EDT
static void Main(string[] args) { int[]array1= new int [5]; int[]array2= new int[5]; int[]array3=new int[5]; Console.WriteLine(" enter Elements of Array1."); for (int i = 0; i < 5; i++) { array1[i] = Convert.ToInt32(Console.ReadLine()); } Console.WriteLine("enter elements of array2."); for (int i = 0; i < 5; i++) { array2[i] = Convert.ToInt32(Console.ReadLine()); } for (int i = 0; i < 5; i++) { array3[i] = array1[i] + array2[i]; } for (int j = 0; j < 5; j++) { Console.WriteLine(array3[j]); } Console.ReadLine(); }