Posts

Showing posts with the label Matrix Addition

C Program to Calculate Addition of Two Matrices (दो Matrices का जोड़ ज्ञात करने का C प्रोग्राम)

Matrix addition is the process of adding the corresponding elements of two matrices having the same number of rows and columns. Matrix Addition वह प्रक्रिया है जिसमें समान Rows और Columns वाली दो Matrices के संगत तत्वों को जोड़ा जाता है। इस प्रोग्राम में हम दो 2×2 Matrices का जोड़ ज्ञात करेंगे। C Program #include <stdio.h> #define R 2 #define C 2 int main() { int a[R][C], b[R][C], add[R][C]; int i, j; printf("Enter elements of Matrix A:\n"); for (i = 0; i < R; i++) { for (j = 0; j < C; j++) { printf("Enter A[%d][%d] = ", i, j); scanf("%d", &a[i][j]); } } printf("\nEnter elements of Matrix B:\n"); for (i = 0; i < R; i++) { for (j = 0; j < C; j++) { printf("Enter B[%d][%d] = ", i, j); scanf("%d", &b[i][j]); } } /* Addition of two matrices */ for (i = 0; i < R...