public static void Main()
int i, n,r, sum=0,nsum=0,num=0,newsum=0,ro=0;
Console.Write("\n\nFind 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);
if (sum == 0 && nsum > 9)
Console.WriteLine("Sum of the Numbers order1: "+nsum);