public static void Main()
int[] myArray = new int[5];
for(int i = 0; i < 5; i++){
Console.WriteLine("************Summing the Arrays*************");
Console.WriteLine("First, summing with a void method.");
Console.WriteLine("*******************************************");
Console.WriteLine("Now, summing with an integer method.");
int methodSum = sumArrayInt(myArray);
Console.WriteLine("The sum of all elements in the array is " + methodSum + ".");
Console.WriteLine("*******************************************");
public static void sumArrayVoid(int[] arr){
for(int i = 0; i < arr.Length; i++){
Console.WriteLine("The sum of all elements in the array is " + sum + ".");
public static int sumArrayInt(int[] arr){
for(int i = 0; i < arr.Length; i++){