矩阵相加!为何结果不对?

#include"iostream.h"#include"iomanip.h"const int M=3;const int N=4; //列大小int main() //a,b数组设置初值{int a[M][N]={{11,22,33,44},{20,30,40,50},{31,41,51,61}},b[M][N]={{50,24,43,42},{75,74,78,27},{23,56,35,23}},c[M][N];int i,j;cout<<"a数组值:\n";for(i=0;i<M;i++){for(j=0;j<N;j++)cout<<setw(4)<<a[i][j];cout<...
C++ | 2010-06-05 11:19 | 阅读 418 次 | 评论 0 条
文章分类
文章归档
最新评论