You are here:

# C++/Structure chart in C++

Question
Hi! This is my first semester programming and I have homework assignemt. Assignment is I need to write a program to do matrix multiplication (limit a program to 3*3) and I have to draw a structure chart. Can you please help me! Thank you so much.

Hai Dear Ravi!

Here is the programme what actually you are looking for !

#include <iostream.h>
int main()
{
int a[3][3] , b[3][3] , c[3][3];
int i , j , k;

cout<<"Enter A matrix ";
for( i = 0 ; i < 3 ; i++)
for( j = 0 ; j < 3 ; j++)
cin>> a[i][j];
cout<<"Enter B matrix ";
for( i = 0 ; i < 3 ; i++)
for( j = 0 ; j < 3 ; j++)
cin>>b[i][j];
for( i = 0 ; i < 3 ; i++)
{
for( j = 0; j < 3 ; j++)
{
c[i][j] = 0;
for( k = 0 ; k < 3 ; k++)
c[i][j] += a[i][k]*b[k][j];
}
}
cout<<"The resultant matrix is : ";
for( i = 0 ; i < 3 ; i++)
{
for( j = 0 ; j < 3 ; j++)
cout<<c[i][j];
cout<<"\n";
}
return 0;

}

In order to draw th structure chart , you should be familiar with the notations used in  the structure chart , so i kindly request you to visit the following link to understand the notations !

http://elearning.tvm.tcs.co.in/SDO/SDO/3_2.htm
http://blogs.ittoolbox.com/eai/implementation/archives/using-structure-charts-16

Thanks and Regards !
Prince M. Premnath
Questioner's Rating
 Rating(1-10) Knowledgeability = 10 Clarity of Response = 10 Politeness = 10 Comment Hi! Thank you so much for your help. I compiled the program and it ran perfectly. I was playing with the program and it was fun. Thank again for helping me out.

C++

Volunteer

#### Prince M. Premnath

##### Expertise

Years of research in C/C++ Will bring you all facts regarding , OOPS , SVGA , MOUSE , BIOS , IVT , Feel free to query me :-)

##### Experience

More than 5 years

Education/Credentials
MCA