public class stringandarray
public static void Main()
Console.Write("\n\n find sum of all elements of array:\n");
Console.Write("-----------------------------------------------------------------------------------------------\n");
Console.Write("input the number of elements to be stored in the array :");
n = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements in the array :\n",n);
Console.Write("element - {0} : ",i);
a[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("Sum of all elements stored in the array is : {0}\n\n", sum);