AllExperts > C++ 
Search      
C++
Volunteer
Answers to thousands of questions
 Home · More C++ Questions · Answer Library  · Encyclopedia ·
More C++ Answers
Question Library

Ask a question about C++
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About 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

 
   

You are here:  Experts > Computing/Technology > C/C++ > C++ > Structure chart in C++

C++ - Structure chart in C++


Expert: Prince M. Premnath - 3/24/2008

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.

Answer
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  

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.