作业帮 > 综合 > 作业

用C++编写一个矩阵转置的函数,矩阵的行数列数由用户输入

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/07/29 06:56:49
用C++编写一个矩阵转置的函数,矩阵的行数列数由用户输入
用C++编写一个矩阵转置的函数,矩阵的行数列数由用户输入
#include
using namespace std;
void zhuanzhi(int *,int r,int c);
int main()
{
int row,col;
int *mat=0;
coutrow>>col;
mat = new int[row*col];
if (mat != 0)
{
for (int i=0;i*(mat+i*col+j);
}
}
zhuanzhi(mat ,row,col);
system("pause");
delete[] mat;
}
else
{
cout