#include<stdio.h>
void AddMatrix(int[2][3],int[2][3],int[2][3],int,int);
int main()
{
int i,j;
int matrixA[2][3], matrixB[2][3], matrixC[2][3];
printf("This Program is to find the summation of matrixA and matrixB\n\n");
for(i=0;i<=1;i++){
for(j=0;j<=2;j++){
printf("Please enter matrixA[%d][%d]:",i+1,j+1);
scanf("%d", &matrixA[j]);
}
}
printf("\n\n");
for(i=0;i<=1;i++){
for(j=0;j<=2;j++){
printf("Please enter matrixB[%d][%d]:",i+1,j+1);
scanf("%d", &matrixB[j]);
}
}
printf("\n\n");
AddMatirix(matrixA,matrixB,matrixC);
return 0;
}
void AddMatrix(int matrixC[2][3], int matrixA[2][3], int matrixB[2][3], int i, int j)
{
for(i=0;i<=1;i++){
for(j=0;j<=2;j++){
matrixC[2][3] = matrixA[j] + matrixB[j];
}
}
for(i=0;i<=1;i++){
for(j=0;j<=2;j++){
printf("matrixC is the summation of both matrixA and matrixB: %d", matrixC[j]);
}
}
printf("\n\n");
return;
}
please help this out..
I'm confused..