// This program scans in an integer n, and // computes the sum of squares from 1 to n. // // Unfortunately, this code contains a number of errors. // It's your job to fix them, good luck! #include // Do not change this function prototype void find_sum_of_square(int n, int *result); // You may change the main function as it has bugs int main(void) { int n; int result; printf("Enter n: "); scanf("%d", *n); find_sum_of_square(n, result); printf("The sum of squares from 1 to %d is: %d\n", n, result); return 0; } // Function definition // This function computes the sum of squares from 1 to n // and stores the result in the variable pointed to by result void find_sum_of_square(int n, int *result) { int sum; for (int i = 0; i < n; i++) { sum += i ^ 2; } result = sum; return; }