diff --git a/Cpp/Maths/Average.cpp b/Cpp/Maths/Average.cpp new file mode 100644 index 0000000..d680a4a --- /dev/null +++ b/Cpp/Maths/Average.cpp @@ -0,0 +1,16 @@ +#include +using namespace std; +int main() +{ + int n; + cout<<"Enter the size of array : "; + cin>>n; + int a[n],i,average; + float sum=0; + cout<<"Enter array elements : \n"; + for(i=0;i>a[i]; + for(i=0;i +using namespace std; +int main() +{ + int r,i,j,k; + cout<<"Enter no. of rows after which u want to mirror image below of above : "; + cin>>r; + cout<<"Diamond Pattern : \n"; + for(i=1;i<=r;i++) + { + for(j=1;j<=r-i;j++) + cout<<" "; + for(k=1;k<=((2*i)-1);k++) + cout<<"*"; + cout<<"\n"; + } + for(i=1;i +using namespace std; +int main() +{ + int r,c,i,j; + cout<<"Enter rows : "; + cin>>r; + cout<<"Enter columns : "; + cin>>c; + int A[r][c],B[c][r]; + cout<<"Enter matrix elements : \n"; + for(i=0;i>A[i][j]; + } + cout<<"Matrix A : \n"; + for(i=0;i