matrix

所属分类:数值算法/人工智能
开发工具:Visual C++
文件大小:1KB
下载次数:4
上传日期:2013-09-06 03:30:37
上 传 者xiongweiwei1020
说明:  矩阵(二) 编写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)释放矩阵空间。
(Matrix (two) write C++ program performs the following functions: (1) assuming matrix size of 45 (integer) (2) matrix spaces using new dynamic applications, stored in the pointer (3) define the matrix initialization function, you can Enter the matrix elements from cin (4) defines the output function matrix, the matrix format the output to cout (5) defines a function of matrix addition, to achieve the function of two matrices and stores the result in another matrix (6) Define the matrix subtraction function, the realization of the function of two matrices subtraction result is stored in another matrix (7) for the three matrices Dynamic: A1, A2, A3 (8) initialization A1, A2 (9) calculate and output A3 = A1 plus A2, A3 = A1 minus A2 (10) release matrix space.)

文件列表:
5.cpp (3699, 2013-09-03)

近期下载者

相关文件


收藏者