matrix multiplication 3x3 for loops???
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: matrix multiplication 3x3 for loops???

  1. #1
    Join Date
    Apr 2013
    Posts
    1

    matrix multiplication 3x3 for loops???

    So basically I have to tell the user to input data and i use a for loop:
    for (i=0; i< 3; i++)
    cin >> p[i][0],p[i][1], p[i][2];

    now for the confusing part is, what do i put in the nested for loops to multiply them and output them so it looks something like

    matrix p,r1: # # #
    " ",r2: " "
    " " " "

    thanks

  2. #2
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,364

    Re: matrix multiplication 3x3 for loops???

    If you were mutiplying 3x3 matrices on paper by hand, how would you do it? When you know how you would do it by hand, then you know the algorithm and then you can can code the algorithm in c++.

    You might like to read this
    http://msdn.microsoft.com/en-gb/library/hh873134.aspx
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center