answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int a[3][3],b[3][3],c[3][3],r,c;

for(r=0;r<=3;r++)

{

for(c=0;c<3;c++)

{

printf("\n enter the value=");

scanf("%d%d",&a[r][c],&b[r][c]);

}

}

printf("\n first matrix=\n");

for(r=0;r<=3;r++)

{

for(c=0;c<3;c++)

{

printf("%d\t",a[r][c]);

}

printf("\n");

}

printf("\n scond matrix=\n");

for(r=0;r<=3;r++)

{

for(c=0;c<3;c++)

{printf("%d\t",b[r][c]);

}

printf("\n");

}

printf("\n sum of given matrix=\n");

for(r=0;r<=3;r++)

{

for(c=0;c<3;c++)

{

c[r][c]=a[r][c]+b[r][c];

printf("%d\t",c[r][c]);

}

printf("\n");

}

getch();

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Write a C program to accept the elements of a 3 x 3 matrix and find its sum of the major diagonal elements The program should print the given matrix along with its sum of the major diagonal elements?

#include &lt;stdio.h&gt; #include &lt;conio.h&gt; void main() { int d[3][3] = { 1, 2, 6, 3, 8, 5, 5, 6, 7 }; int k = 0, j = 0; int sum1 = 0, sum2 = 0; for (j = 0; j &lt; 3; j++) { for (k = 0; k &lt; 3; k++) printf(" %3d", d[j][k]); printf("\n"); } for (j = 0; j &lt; 3; j++) { sum1 = sum1 + d[j][j]; } k = 3 - 1; for (j = 0; j &lt; 3; j++) { if (k &gt;= 0) { sum2 = sum2 + d[j][k]; k--; } } printf("Sum of First diagonal= %d\n", sum1); printf("Sum of Second diagonal= %d", sum2); getch();


Write a program to print the sum of a sparse matrix?

This is a directive, not a question.


Write a program using iostreams to take as input two multi-dimensional arrays and print their sum as output Matrix Addition in Matrix format?

http://www.assignmentsclub.com/


How do you erase dot matrix print from paper?

how do you erase dot matrix print form paper


What is the highest quality of print produced by a dot matrix?

A basic dot matrix has 9 pins, which produces an average print. A dot matrix with 24 pins (or more) will produce a better quality print.


Printer has a print head that moves across the width of the paper using pins to print a matrix of dots on the page?

dot matrix


C program to print helical matrix?

//the following code will help you to write the program for(i=n-1, j=0; i &gt; 0; i--, j++) //n is the order of the square matrix { for(k=j; k &lt; i; k++) printf("%d ", a[j][k]); for(k=j; k &lt; i; k++) printf("%d ", a[k][i]); for(k=i; k &gt; j; k--) printf("%d ", a[i][k]); for(k=i; k &gt; j; k--) printf("%d ", a[k][j]); } m= (n-1)/2; //calculate the position of the middle element if (n% 2 == 1) printf("%d", a[m][m]);//to print the middle element also //9809752937(udanesh)


Is it possible to print matrix without using array?

Yes but why.


Differentiate line and dot matrix printer?

A line printer and dot matrix printer differ in how they print pages. Line printers are more commonly used with computers, while dot matrix printers function similarly to a typewriter.PrintingA line printer print pages exactly as its name implies, one line at a time. Dot matrix printers use pins arranged in a matrix that physically strike an ink ribbon between the pin and the paper to print characters.SpeedLine matrix printers can print roughly 1,200 lines per minute, or generally about 20 pages per minute. Dot matrix printers print about 40-300 characters per second, or about six to seven pager per minute, at best.QualityDot matrix printers have a lower print quality than line printers. The characters' shapes on pages printed using a dot matrix printer appear as a number of dots connected together. Line printers print solid characters and can use a wide variety of font face and sizes.


Write a unix program to print print a pattern?

echo 'print a pattern'


Write a java program to print the result in the series?

If you have the series stored in an array, you loop through the array and print each array element in turn. Another possibility is to print out the numbers in the series as you generate them. In that case, you may not need to store anything (depending on the series, of course).


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?