Why the below C code is not running properly?
//Matrix multiplication #include <stdio.h> #include <conio.h> int main() { int a[10][10],B[10][10],C[10][10],i,j,k,sum,m,n,p,q; sum=0; //clrscr(); printf("enter the size of matrix (row*column) A\n"); scanf("%d%d",&m,&n); printf("enter the size of matrix (row*column) B\n"); scanf("%d%d",&p,&q); if(n!=p) { printf("\nmultiplication is not possible"); } else { printf("\nenter elements for matrix A:\n"); for(i=0;i<m;i++); { for(j=0;j<n;j++); { printf("\nelement A[%d][%d]=",i,j); scanf("%d",&a[i][j]); } } printf("\nenter elements for matrix B:\n"); for(i=0;i<p;i++); { for(j=0;j<q;j++); { printf("\nelement B[%d][%d]=",i+1,j+1); scanf("%d",&B[i][j]); } } //now multiplication for(i=0;i<m;i++); { for(j=0;j<q;j++); { sum=0; for(k=0;k<p;k++) { sum=sum+a[i][k]*B[k][j]; C[i][j]=sum; } } } //printing result for(i=0;i<m;i++); { for(j=0;j<q;j++); { printf("%d\t",C[i][j]); } printf("\n"); } return 0; }}