number 1 code
number 1 code
h>
#include <stdlib.h>
int main() {
int matrices, rows1, cols1, rows2, cols2, i, j, k;
if (matrices != 2) {
printf("Error: Only 2 matrices are supported.\n");
return 1;
}
printf("Sum of matrices:\n");
for (i = 0; i < rows1; i++) {
for (j = 0; j < cols1; j++) {
printf("%d ", sum[i][j]);
}
printf("\n");
}
return 0;
}