Here's one way you could write the code in C to find the index of the integer i where the sum of the numbers before i and the sum of the numbers after i are equal: c Copy code #include <stdio.h> #define MAX_LENGTH 30 int main() { int lines = 1000; int numbers[MAX_LENGTH]; int i, j, k; int sum_before, sum_after; for (i = 0; i < lines; i++) { // Read the line of numbers for (j = 0; j < MAX_LENGTH; j++) { scanf("%d", &numbers[j]); } // Check each number in the line for (j = 0; j < MAX_LENGTH; j++) { sum_before = 0; sum_after = 0; // Calculate the sum of the numbers before i for (k = 0; k < j; k++) { sum_before += numbers[k]; } // Calculate the sum of the numbers after i for (k = j + 1; k < MAX_LENGTH; k++) { sum_after += numbers[k]; } // Check if the sum of the numbers before i and after i are equal if (sum_before == sum_after) { printf("Line %d: i = %d\n", i + 1, j + 1); break; } } } return 0; } In this code, the outermost loop for (i = 0; i < lines; i++) reads the lines of numbers, one line at a time. The second loop for (j = 0; j < MAX_LENGTH; j++) reads the numbers in the current line. The innermost loop for (k = 0; k < j; k++) calculates the sum of the numbers before i, and the loop for (k = j + 1; k < MAX_LENGTH; k++) calculates the sum of the numbers after i. If the sum of the numbers before i and the sum of the numbers after i are equal, the index of i is printed, and the loop is broken.