Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I got this home work assignment that I am having some trouble with I was wonderi

ID: 3659230 • Letter: I

Question

I got this home work assignment that I am having some trouble with I was wondering if someone could help me out. Here's the problem: Write the code for a method called calcTotal that takes in a two-dimensional array of integers and returns an integer. The total is calculated as follows: For each element in the array take the sum of the two indexes and multiply the element by this sum. Take 1/2 of that value and add it to the overall total. The total is the sum of each position using this formula.

Explanation / Answer

#include #include void main() { int m, n, c, d, first[10][10], second[10][10], sum[10][10]; printf("Enter the number of rows and columns of matrix "); scanf("%d%d", &m, &n); printf("Enter the elements of first matrix "); for ( c = 0 ; c