diff --git a/Sum_lowerTrianguElement.cpp b/Sum_lowerTrianguElement.cpp new file mode 100644 index 0000000..7e91e70 --- /dev/null +++ b/Sum_lowerTrianguElement.cpp @@ -0,0 +1,57 @@ +#include +using namespace std; +int main() +{ + int i, j, arr[10][10], sum, rows, cols; + cout<<"\n Enter Number of Rows : "; + cin>>rows; + + cout<<"\n Enter Number of Columns : "; + cin>>cols; + + for (i = 0; i < rows; i++) //Accepting the Elements in Matrix + { + for (j = 0; j < cols; j++) + { + cout<<"\n Enter the Elements : ";//<>arr[i][j]; + } + } + cout<<"\n Matrix is : \n"; + for (i = 0; i < rows; i++) //Displaying the Elements in Matrix + { + cout<<" "; + for (j = 0; j < cols; j++) + { + cout<<" "; + cout< j) + { + cout<<" "; + cout< j) + { + sum = sum + arr[i][j]; + } + } + cout<<"\n Sum of Lower Triangle Elements : "<