Multiplication of Array in OOPs hi, This is Sohail,I am studying in MCS 3rd semester,from BZU sub-campus DGKhan. Multiplication of Array main() { int a[2][2],b[2][2],c[2][2],i,j,k; for(i=1;i<=2;i++) for(j=1;j<=2;j++) { cout<<"Enter the 1st array"; cin>>a[i][j]; } for(i=1;i<=2;i++) for(j=1;j<=2;j++) { cout<<"Enter the 2nd array"; cin>>b[i][j]; } for(i=1;i<=2;i++) for(j=1;j<=2;j++) { c[i][j]=0; } for(i=1;i<=2;i++) for(j=1;j<=2;j++) for(k=1;k<=2;k++) { c[i][j]+ =c[i][k]*c[k][j]; } for(i=1;i<=2;i++) for(j=1;j<=2;j++) { cout< } getch(); } |
All times are GMT +5. The time now is 12:09 PM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.