From b98ee6887406abb3daefc8b50ded9050b45042c8 Mon Sep 17 00:00:00 2001 From: Monalika Date: Wed, 26 May 2021 19:37:40 +0530 Subject: [PATCH] Create Subtraction of two matrices using arrays.cpp --- Subtraction of two matrices using arrays.cpp | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Subtraction of two matrices using arrays.cpp diff --git a/Subtraction of two matrices using arrays.cpp b/Subtraction of two matrices using arrays.cpp new file mode 100644 index 0000000..443e06c --- /dev/null +++ b/Subtraction of two matrices using arrays.cpp @@ -0,0 +1,59 @@ +/* C++ Program to Subtract Two Matrices using array */ + +#include +using namespace std; + +int main() +{ + + int arr1[5][5], arr2[5][5], arr3[5][5], sub, i, j,m,n; + + cout<<"Enter size of matrix ( Max:5 ) :: "; + cin>>m; + cout<<"\nEnter Elements to Matrix A Below :: \n"; + + for(i=0;i>arr1[i][j]; + } + + } + + cout<<"\nEnter Elements to Matrix B Below :: \n"; + + for(i=0;i>arr2[i][j]; + } + + } + + + cout<<"\nSubtracting Matrix ( A - B ) ..... \n"; + for(i=0; i