English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

program pls with details

2006-10-28 17:09:21 · 2 answers · asked by srinivas r 1 in Computers & Internet Programming & Design

2 answers

You can take a look at: http://mymathlib.webtrellis.net/matrices.html

2006-10-28 17:11:45 · answer #1 · answered by juliepelletier 7 · 0 1

/*demo of matrix-addition*/
#include
void main()
{
int a[3][3],b[3][3],c[3][3];
int i,j,m,n,p,q;
clrscr();
printf("Enter order of matrix A");
scanf("%d%d",&m,&n);
printf("Enter order of matrix B");
scanf("%d%d",&p,&q);
if((m!=p)||(n!=q))
{
printf("Addn. not possible");
}
else
{
for(i=0;i {
for(j=0;j {
printf("Enter element of matrix A");
scanf("%d",&a[i][j]);
}
}
for(i=0;i {
for(j=0;j {
printf("Enter element of matrix B");
scanf("%d",&b[i][j]);
}
}
for(i=0;i {
for(j=0;j {
c[i][j]=a[i][j]+b[i][j];
}
}
printf("Matrix C is");
for(i=0;i {
for(j=0;j {
printf("%d\t",c[i][j]);
}
printf("\n");
}
}
getch();
}

2006-10-28 18:31:01 · answer #2 · answered by Innocence Redefined 5 · 1 0

fedest.com, questions and answers