C++ 矩阵的加减乘除.docVIP

  • 7
  • 0
  • 约4.51千字
  • 约 9页
  • 2020-06-11 发布于安徽
  • 举报
《矩阵类》 程序设计基础课程设计报告 二OO八 年 七月一日 目 录 TOC \o 1-3 \h \z \u The new Matrix is: endl; coutendl; for(int i=0;iM;i++) for(int j=0;jM;j++) { outputa.q[i][j] ; if(j==M-1) coutendl; } return output; } int main() {Matrix a,b,c,d,f,k; // 定义对象a,b,c,d,f cina; cinb; c=a+b; d=a-b; f=a*b; coutendlMatrix a is:endl; couta; coutendlMatrix b is:endl; coutb; coutendlMatrix c = Matrix a + Matrix b is:endl; coutc; //输出两矩阵之和 coutendlMatrix d = Matrix

文档评论(0)

1亿VIP精品文档

相关文档