I strongly suggest that you sit down with pencil and paper and work out an example step by step, writing down what you are doing (e.g., I'm multiplying row 1 by a factor of a and added it to row 2, etc. etc. Then translate that into what the program will have to do (into your own pseudocode) and into actual code.
The reason people are reticent to help you (or anyone in your position really) is that you have shown no effort. There are dozens of examples online that go into quite a bit of detail. To search and then say you found "nothing" on this topic is absurd.
u may be right , but really my knowledge about programing is so weak , I only took one course about the basic of c++ long ago, and when I see a code I can't tell what the code for, and when I searched I found some longs codes but I couldn't tell which part of it that I need.
Let's be clear. No one on this site is going to give you the code. If you haven't had C++ in a long time: 1) What a great time to review (and this is a ready problem with which to apply that knowledge) or 2) attempt it in another language with which you are comfortable. Clearly the person assigning this to you believes that you have enough knowledge for the undertaking or that you can use whatever knowledge you do have as a starting point to further your pursuit of C++.
My advice would be to go through some of the "long codes" and see which parts are recognizable to you, cobble something (of your own merit) together and post back.