#include //------------------------------------------------------------------- // Matrix addition/subtraction // by Ching-Han Chen // 2006-03-14 //-------------------------------------------------------------------- void main() { float A[2][3]={1,2,3, 0,1,4}; float B[2][3]={2,3,0, -1,2,5}; float C[2][3],D[2][3]; int i,j; for(i=0;i<2;i++) { for(j=0;j<3;j++) { C[i][j]=A[i][j]+B[i][j]; D[i][j]=A[i][j]-B[i][j]; cout<