BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Tutorial (http://bzupages.com/4-tutorial/)
-   -   Multiplication of Array in OOPs (http://bzupages.com/f4/multiplication-array-oops-542/)

Muhammad Sohail Akhtar 26-06-2008 11:47 PM

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< cout<<"\n";
}
getch();
}


All times are GMT +5. The time now is 09:43 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.