文件名称:matrix
介绍说明--下载内容均来自于网络,请自行研究使用
2、 矩阵(二)
编写C++程序完成以下功能:
(1) 假定矩阵大小为4×5(整型);
(2) 矩阵空间采用new动态申请,保存在指针中;
(3) 定义矩阵初始化函数,可以从cin中输入矩阵元素;
(4) 定义矩阵输出函数,将矩阵格式化输出到cout;
(5) 定义矩阵相加的函数,实现两个矩阵相加的功能,结果保存在另一个矩阵中;
(6) 定义矩阵相减的函数,实现两个矩阵相减的功能,结果保存在另一个矩阵中;
(7) 动态申请三个矩阵:A1、A2、A3;
(8) 初始化A1、A2;
(9) 计算并输出A3 = A1加A2,A3 = A1减A2;
(10) 释放矩阵空间。-2, matrix (2)
The preparation of C++ program to accomplish the following functions:
(1) assumes that matrix size of 4 × 5 (integer)
(2) matrix space with new dynamic applications, stored in the pointer
(3) defines the matrix initialization function, you can enter the matrix elements from the cin
(4) defines the matrix of output function, the matrix format the output to cout
(5) defines the matrix, the sum of the function, the sum of two matrices to achieve the functions of a matrix stored in another
(6) defines a function of matrix subtraction, subtract two matrices to achieve the function, the results stored in another matrix
(7) dynamic applications for three matrices: A1, A2, A3
(8) to initialize A1, A2
(9) to calculate and output of A3 = A1 plus A2, A3 = A1 by A2
(10) release matrix space.
编写C++程序完成以下功能:
(1) 假定矩阵大小为4×5(整型);
(2) 矩阵空间采用new动态申请,保存在指针中;
(3) 定义矩阵初始化函数,可以从cin中输入矩阵元素;
(4) 定义矩阵输出函数,将矩阵格式化输出到cout;
(5) 定义矩阵相加的函数,实现两个矩阵相加的功能,结果保存在另一个矩阵中;
(6) 定义矩阵相减的函数,实现两个矩阵相减的功能,结果保存在另一个矩阵中;
(7) 动态申请三个矩阵:A1、A2、A3;
(8) 初始化A1、A2;
(9) 计算并输出A3 = A1加A2,A3 = A1减A2;
(10) 释放矩阵空间。-2, matrix (2)
The preparation of C++ program to accomplish the following functions:
(1) assumes that matrix size of 4 × 5 (integer)
(2) matrix space with new dynamic applications, stored in the pointer
(3) defines the matrix initialization function, you can enter the matrix elements from the cin
(4) defines the matrix of output function, the matrix format the output to cout
(5) defines the matrix, the sum of the function, the sum of two matrices to achieve the functions of a matrix stored in another
(6) defines a function of matrix subtraction, subtract two matrices to achieve the function, the results stored in another matrix
(7) dynamic applications for three matrices: A1, A2, A3
(8) to initialize A1, A2
(9) to calculate and output of A3 = A1 plus A2, A3 = A1 by A2
(10) release matrix space.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
matrix.cpp