Answer to Question #37314 in Other Programming & Computer Science for Jim
Write a program largeHalf.c that takes in a list of 8 integers, splits the list into two halves (ﬁrst 4 elements, last 4 elements), sums the elements in each half, selects the half with the larger sum, and then repeats this process with the selected list until there is only one element selected. The program should print out the half selected at each step. If the two halves have equal sum, the program should tell the user this and should always pick the ﬁrst half (the one with a smaller starting index, see the example output below). Your program must include the following functions: int sumArray(int array, int startIdx, int len) - Returns the sum of the elements in array with index startIdx to startIdx+len. void printArray(int array, int startIdx, int len) - Print the elements in array with index startIdx to startIdx+len.
Dear visitor, What programming language should we use?