Solving the matrix equation a = {1 2 3} 3 6 9 2 5 7 1 2 4 rank a=

Solving the matrix equation a = {1 2 3} 3 6 9 2 5 7 1 2 4 rank a=


A = [1 2 4 = [1 2 4] it can be seen that its rank rank a = 1, which is the most basic content of matrix
2 5 7 0 1 -1
3 6 9] 0 0 1]



Write a program to calculate the sum of the two diagonal elements of the following 4 * 4 two-dimensional array
45 30 26 48
55 20 17 39
41 25 19 22
31 18 22 10
Wrong area, I want to ask VB


#include
int main()
{
int i,j,sum;
int angs[4][4];
Printf ("please input the matrix: ');
sum = 0;
for(i = 0; i < 4; i++)
for(j = 0; j < 4; j++)
{
scanf("%d",&angs[i][j]);
if(i == j || i+j == 3)
sum += angs[i][j];
}
printf("%d\n",sum);
return 0;
}



VB, programming, the establishment and output of a 10 × 10 matrix, the diagonal element of the matrix is 1, the other elements are 0


Very simple two-dimensional array problem, first declare a 0-10, 0-10 array, and then for I = 1 to 10 do for J = 1 to 10 do if I = J then a (I, J) = 1 else a (I, J) = 0 should be that I'm not VB, so I can only provide ideas, that's how it is, the rest of their own perfect assignment finished output, don't tell me you don't