━━┛\n"); printf("输入要进行的项目的编号:"); scanf("%d",&flag); if(flag==4)?break; Creat(A); printf("矩阵A:\n");Print_SMatrix(A); switch(flag) { case1:?Creat(B);n=1; printf("矩阵B:\n"); Print_SMatrix(B); if(A.mu==B.mu&&A.nu==B.nu) { printf("A+B:\n"); Xiangjia(A,B,C,n); Print_SMatrix(C); } elseprintf("错误!行列不一致\n"); break;case2:Creat(B);n=-1; printf("矩阵B:\n"); Print_SMatrix(B); if(A.mu==B.mu&&A.nu==B.nu) { printf("A-B:\n"); Xiangjia(A,B,C,n); Print_SMatrix(C); } elseprintf("错误!行列不一致\n"); break; case3:?Creat(B); printf("矩阵B:\n"); Print_SMatrix(B); printf("A*B:\n"); n=Xiangcheng(A,B,C); if(!n)?printf("错误!行列不匹配\n"); else?Print_SMatrix(C); break; default:?printf("输入错误!\n"); } Destory_SMatrix(A); Destory_SMatrix(B); Destory_SMatrix(C); getchar();getchar();?}?printf("\n\t\t\t***程序已经退出***\n");?getchar();}调试过程:测试结果