View Single Post
Old 26-06-2008, 11:47 PM   #1
Multiplication of Array in OOPs
Muhammad Sohail Akhtar Muhammad Sohail Akhtar is offline 26-06-2008, 11:47 PM

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();
}


 
Muhammad Sohail Akhtar's Avatar
Muhammad Sohail Akhtar
First Time Poster!

Join Date: Jun 2008
Location: D.G.Khan
Age: 37
Posts: 1
Contact Number: 0333-3951814
Program / Discipline: MCS07
Class Roll Number: mcs-07-03
Views: 2347
Reply With Quote