Home > Back-end >  C language to solve
C language to solve

Time:12-10

Define a line 5 five columns of two-dimensional array, the array elements initialized rules for: row subscript for the I element value=I + 2 * 3, the data according to the model output, and calculate the sum of the values of the two diagonals,

CodePudding user response:

Didn't quite understand the array elements initialized rules as follows: the row subscript for the element value=I * 2 + 3, I mean each row of data is 3 or 5,,, as long as you understand this rule, this problem is very simple, the rules of the main diagonal is I==5-1 - j, deputy diagonal rule is I==j, I also is new
  • Related