diff --git a/README.md b/README.md index 3e2bbcd..d322231 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ To add a new entry, simply follow this syntax inside [ ]: ```json { - "name": "YOUR-FULLNAME", - "bio": "YOUR-BIO", + "name": "ADITYA PATHAK", + "bio": "PROGRAMMER", "github_url": [ - "https://github.com/YOUR-GITHUB-USERNAME/" + "https://github.com/paditya99/" ], - "github_username": "YOUR-GITHUB-USERNAME" + "github_username": "paditya99" } ``` diff --git a/marix.cpp b/marix.cpp new file mode 100644 index 0000000..5a7ad3f --- /dev/null +++ b/marix.cpp @@ -0,0 +1,220 @@ +#include +using namespace std; +void matrixrow_add(int a[100][100],int n,int m) +{ + cout<<"\n ________________________________________________________________________________\n"; + cout<<"\n"; + cout<<"\n\n\t => THE ROW WISE SUM OF MATRIX : \n"; + cout<<"\n"; + int sum=0,sum2=0; + for(int i=0;i THE COLUMN WISE SUM OF MATRIX : \n"; + cout<<"\n"; + + int sum=0; + for(int i=0;i SUM OF THE MAJOR DIAGONAL OF MATRIX : "< SUM OF THE MINOR DIAGONAL OF MATRIX : "< !! ERROR !! No. of rows and columns are not same, so sum of diagonal cannot be calculated. \n"; + } + cout<<"\n"; + +} +void matrixlowtri_add(int a[100][100],int n,int m) +{ + cout<<"\n ________________________________________________________________________________\n"; + cout<<"\n"; + + cout<<"\n\t => THE LOWER TRIANGULAR ELEMENTS OF MATRIX IS SHOWN BELOW : \n"; + int sum=0; + for(int i=0;i=j) + { + cout< SUM OF LOWER TRIANGULAR ELEMENTS OF THE MATRIX IS : "< THE UPPER TRIANGULAR ELEMENTS OF MATRIX IS SHOWN BELOW : \n"; + int sum=0; + for(int i=0;ij) + { + cout<<"_"<<" "; + } + } + cout<<"\n"; + } + cout<<"\n\t => SUM OF UPPER TRIANGULAR ELEMENTS OF THE MATRIX IS : "< TRANSPOSE OF THE MATRIX IS : \n"; + cout<<"\n"; + for(int i=0;i>n; + cout<<"\n\t Enter the number of columns(m) : "; + cin>>m; + cout<<"\n\n\t Enter the elements of the matrix : "; + for(i=0;i>a[i][j]; + } + } + cout<<"\n\t THE MATRIX YOU ENTERED IS : \n"; + for(i=0;i>x; + switch(x) + { + case 1: + matrixrow_add(a,n,m); + matrixcol_add(a,n,m); + break; + + case 2: + matrixdiag1_add(a,n,m); + break; + + case 3: + if(n==m) + { + matrixlowtri_add(a,n,m); + matrixupptri_add(a,n,m); + } + else + { + cout<<" ______________________________________________________________________\n"; + cout<<"\n\n\t ERROR !! 'n' is not equal to 'm'. \n"; + } + + + break; + + case 4: + matrixtranspose(a,n,m); + break; + + default: + cout<<"\n\t INVALID INPUT !! ENTER AGAIN : "; + break; + + } + +}