#include
void main()
{
int A[5][5], B[5][5], C[5][5], i, j, m, n;
clrscr();
printf("\n\n\t ENTER A ORDER OF THE MATRICES M,N...: ");
scanf("%d,%d", &m, &n);
printf("\n\n\t ENTER THE ELEMENTS OF THE FIRST MATRIX..:\n\n");
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
gotoxy(25+j*4,12+i*2);
scanf("%d",&A[i][j]);
}
printf("\n");
}
printf("\n\t ENTER THE ELEMENTS OF THE SECOND MATRIX..:\n\n");
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
gotoxy(25+j*4,18+m+i*2);
scanf("%d",&B[i][j]);
}
printf("\n");
}
for(i=1;i<=m;i++)
for(j=1;j<=n;j++)
C[i][j] = A[i][j] - B[i][j];
printf("\n\t THE DIFFERENCE OF TWO MATRICES IS...:\n\n\t\t\t ");
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
printf(" %d",C[i][j]);
printf("\n\n\t\t\t ");
}
getch();
}
C Program TO FIND THE DIFFERENCE OF TWO MATRICES | Difference of 2 matrix | matrix Program in C | matrix assignment to find difference of two matrix
C Program TO FIND THE DIFFERENCE OF TWO MATRICES | Difference of 2 matrix | matrix Program in C | matrix assignment to find difference of two matrix
Labels:
C Assignments
Subscribe to:
Post Comments (Atom)
If you face any Problem in viewing code such as Incomplete "For Loops" or "Incorrect greater than or smaller" than equal to signs then please collect from My Web Site CLICK HERE
More Useful Topics... |
|
History Of C..
In the beginning was Charles Babbage and his Analytical Engine, a machine
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming
language.
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming
language.
My 1st Program...
#include
#include
void main ()
{
clrscr ();
printf ("\n\n\n\n");
printf ("\t\t\t\"Life is Good...\"\n");
printf ("\t\t\t********************************");
getch ();
}
Next Step...
#include
#include
void main ()
{
clrscr ();
printf ("\n\n\n\n\n\n\n\n");
printf ("\t\t\t --------------------------- \n\n");
printf ("\t\t\t | IGCT, Info Computers, INDIA | \n\n");
printf ("\t\t\t --------------------------- ");
}
No comments:
Post a Comment