c语言编程 输入一个3*3的矩阵,打印该矩阵,并输出该矩阵的对角元素答:include<stdio.h>#define M 3#define N 3void Create_matrix(int matrix[M][N], int m, int n) {int i,j;printf("开始输入矩阵内容(%d行%d列)\n",m,n);for(i=0;i<m;i++) {printf("输入第%d行的%d个元素:",i+1,n);for(j=0;j<n;j++)scanf("%d",&matrix[i][j])...
输出3乘3的矩阵,矩阵由1 2 3 4 5 6 7 8 9依次构成 c语言编程答:include <stdio.h> int main(void){ int a[3][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9};int i, j;for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { printf("%d ",a[i][j]);} printf("\n");} } ...