文件名称:matrix
-
所属分类:
- 标签属性:
- 上传时间:2013-09-06
-
文件大小:1kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
矩阵(二)
编写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.
编写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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.