C, pasted on Oct 19:
 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 ``` ```#include int main(void) { //int i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15; // printf("Please enter 16 digits between 1 and 16: "); // scanf("%d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d", &i0,&i1,&i2,&i3,&i4,&i5,&i6,&i7,&i8,&i9,&i10,&i11,&i12,&i13,&i14,&i15); int array1[16] = {1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2}; //Call the method to sum all the rows. Create the new array to hold //all of the sums. For-loop to print it to the screen sumRows(array1); //Call the method to sum all the columns. Create the new array to hold //all of the column sums. For-loop to print it to the screen int columnSum[4]; sumColumns(array1); //Call the method to sum the two diagonals. Create a new array to hold //the sums. For-loop to print it to the screen int diagonalSum[2]; sumDiagonals(array1); } int sumRows(int array1[]) { { //Create the holder array int rowSum[4]; //Traveses each "row" of the array for(int i = 0; i < 15; i+=4){ rowSum[i/4] = array1[i] + array1[i+1] + array1[i+2] + array1[i+3]; } for(int i = 0; i < 4; i++){ printf(rowSum[i]); } printf("\n"); } int sumColumns(int array1[]);{ //Create the holder array int columnSum[4]; //Traverse each "column" of the array for(int i = 0; i < 4; i++){ columnSum[i] = array1[i] + array1[i+4] + array1[i+8] + array1[i+12]; } //return columnSum; for(int i = 0; i < 4; i++) printf(columnSum[i]+" "); printf("\n"); } int sumDiagonals(int array1[]);{ //Create the holder array int diagonalSum[2]; //Traverse both "diagonals" of the array for(int i = 0; i < 1; i++){ diagonalSum[i] = array1[i] + array1[i+5] + array1[i+10] + array1[i+15]; diagonalSum[i+1] = array1[i+15] + array1[i+10] + array1[i+5] + array1[i]; } //return diagonalSum; { for(int i = 0; i < 2; i++) printf(diagonalSum[i]+" "); } } } ```

Output:
 ```1 2 3 4 5 6 7 8 9 10 11 12 ``` ```In function 'sumRows': Line 38: error: 'for' loop initial declaration used outside C99 mode Line 41: error: redefinition of 'i' Line 38: error: previous definition of 'i' was here Line 41: error: 'for' loop initial declaration used outside C99 mode Line 42: warning: passing argument 1 of 'printf' makes pointer from integer without a cast Line 52: error: 'for' loop initial declaration used outside C99 mode Line 56: error: redefinition of 'i' Line 52: error: previous definition of 'i' was here Line 56: error: 'for' loop initial declaration used outside C99 mode Line 65: error: 'for' loop initial declaration used outside C99 mode Line 72: error: 'for' loop initial declaration used outside C99 mode ```