#include<stdio.h>
#include<conio.h>
main()
{ int a[10][10],b[10][10],c[10][10],m,n,i,j,p,q,op;
printf("enter the order of matrix a:n");
scanf("%d",&m,&n);
printf("enter the %d elements of a\n",m*);
for(i=0;i<m;i++)
for(j=0;j<n;j++)
scanf("%d",&a[i][j]);
printf("enter the order of matrix b:n");
scanf("%d",&p,&q);
printf("enter the %d elements of b\n",p*q);
for(i=0;i<p;i++)
for(j=0;j<q;j++)
scanf("%d",&b[i][j]);
printf("enter the option\n");
scanf("%d",&option);
switch(op)
{ case '+' : if(m==p&&n==q)
printf("the resultant matrix c is:\n");
for(i=0;i<m;i++)
for(j=0;j<n;j++)
c[i][j]=a[i][j]+b[i][j];
printf("%d",c[i][j]);
printf("\n");
break;
case '/' : if(n==p)
{ for(i=0;i<m;;i++);
{for(j=0;j<q;j++)
{printf("%d",c[i][j]);
}
}
c[i][j]=0;
for(p=0;p<n;p++)
c[i][j]=c[i][j]+a[i][p]*b[p][j]:
}
printf("resultant matrix is:\n");
for(i=0;i<m;;i++);
{for(j=0;j<q;j++)
{printf("%d\t",c[i][j]);
}
}
printf("\n");
getch();
}
how to write a program for matrix multiplication in microprocesspr
#include<
you can write by two ways 1 by giving the size of array at declaration 2 by checking condition
write a program to multily 3*3 matrix.
http://www.assignmentsclub.com/
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
for (i=0; i<IMAX; i++) for (j=0; j<JMAX; j++) c[i,j] = a[i,j] + b[i,j];
A C program to square matrix is a math problem. In the math problem you write down all the outer boundary values of matrix in a circle, then write down the inner value.
Yes, do write. That's what you always have to do when you have got a homework-program.
You basically write a nested for loop (one for within another one), to copy the elements of the matrix to a new matrix.
This is a directive, not a question.
matrix