0

What is the error in this program

#include <stdio.h> int main() { int m,n,s=0; int a[1][7],b[7][1],r[1][1]; printf ("Enter the first matrix\n"); printf ("how many number you want in rows and coloumns \n"); for(int i=0;i<1;i++) { for(int j=0;j<7;j++) { printf ("Enter the coloums and rows"); scanf("%d",a[i][j]); } } printf ("Enter the second matrix\n"); printf ("how many number you want in rows amd coloumns \n"); for(int i=0;i<1;i++) { for(int j=0;j<7;j++) { printf ("Enter the coloumns and rows"); scanf("%d",b[i][j]); } } for(int i=0;i<1;i++) { for(int j=0;j<7;j++) { for(int e=0;e<7;e++) { s +=a[i][e]*b[e][j]; r[i][j]=s; s=0; } } } for(int i=0;i<1;i++) { for(int j=0;j<7;j++) { printf ("Your matrix multiplication is %d\n",r[i][j]); } } return 0; }

27th May 2022, 9:40 AM
Bong Rush Gaming YT
1 Answer
+ 2
Put the code in Code Playground and edit the question, using "+" button to include a link to the code. This allows you and everyone willing to help to see the error, then start discussing solutions.
27th May 2022, 9:45 AM
Emerson Prado
Emerson Prado - avatar