From 009d94bf24ac9f9a06c3dd555b3a473010b4db0d Mon Sep 17 00:00:00 2001 From: Divyatmaj Date: Thu, 30 Oct 2025 20:11:18 +0530 Subject: [PATCH] Added two CPP files,for addition and subtraction of Matrices --- math/ADD_TWO_MATRIX | 32 ++++++++++++++++++++++++++++++++ math/SUBTRACT_TWO_MATRIX | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 math/ADD_TWO_MATRIX create mode 100644 math/SUBTRACT_TWO_MATRIX diff --git a/math/ADD_TWO_MATRIX b/math/ADD_TWO_MATRIX new file mode 100644 index 0000000000..49006e6921 --- /dev/null +++ b/math/ADD_TWO_MATRIX @@ -0,0 +1,32 @@ +//addition of matrix or subtraction of matrix +#include +int main() +{ + int a[10][10],b[10][10],x[10][10]; + int r,c; + printf("\n Enter the order of matrix a (max 10x10):"); + scanf("%d%d",&r,&c); + printf("enter the elements of matrix a: "); + for (int i=0;i +int main() +{ + int a[10][10],b[10][10],x[10][10]; + int r,c; + printf("\n Enter the order of matrix a (max 10x10):"); + scanf("%d%d",&r,&c); + printf("enter the elements of matrix a: "); + for (int i=0;i