Citação:
#include "stdio.h"
#include "stdlib.h"
int sub(int x,int y ,int a[x][y], int b[x][y]){
int i,j;
int res[x][y];
for (i=0;i<=x;i++){
for(j=0;j<=y;j++){
res[x][y]=a[x][y]-b[x][y];
}
}
return res[x][y];
}
int soma(int x,int y ,int a[x][y], int b[x][y]){
int i,j;
int res[x][y];
for (i=0;i<=x;i++){
for(j=0;j<=y;j++){
res[x][y]=a[x][y]+b[x][y];
}
}
return res[x][y];
}
int main()
{
int x,y,i,j;
printf("Quantas linhas tem sua matriz?");
scanf("%d",&x);
x=x-1;
printf("Quantas colunas tem sua matriz?");
scanf("%d",&y);
y=y-1;
int matriz1[x][y];
int matriz2[x][y];
for(i=0;i<=x;i++){
for(j=0;j<=y;j++){
printf("Digite o valor(matriz 1) %d x %d\n",i,j);
scanf("%d",&matriz1[x][y]);
}
}
for(i=0;i<=x;i++){
for(j=0;j<=y;j++){
printf("Digite o valor(matriz 2) %d x %d\n",i,j);
scanf("%d",&matriz2[x][y]);
}
}
system("PAUSE");
}
Duvidas..