SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to add two matrices
C program to add two matrices
Output:
Enter the elements of matrix A:
1 2 3
4 5 6
7 8 9
Enter the elements of matrix B:
1 2 3
4 5 6
7 8 9
The Addition of two matrices A & B is:
2 4 6
8 10 12
14 16 18
Implementation:
#include
#define r 3 #define c 3 int main(void) { int a[r][c],b[r][c]; int i,j; printf("Enter the elements of matrix A:\n"); for(i=0;i
PREVIOUS
NEXT
HOME