Reference no: EM13937655
You are going to write a program to multiply two matrices.
The matrices are stored in a two-dimensional array:
int[][] matrixA
int[][] matrixB
Recall:
Here is the way to declare a two-dimensional array:
int testArray[3][4] = {{1,2,3,4},{2,3,4,1},{5,4,3,0}}; // three rows, four columns
/*
after declaration, testArray will be like:
1 2 3 4
2 3 4 1
5 4 3 0
*/
This link may help you recall how to multiply two matrices
https://en.wikipedia.org/wiki/Matrix_multiplication
Your program should be like this:
/*
this program multilies two matrices
*/
#include <iostream>
/* include other libs */
using namespace std;
int main()
{
/* step1: declare three arrays here:
matrixA (3*4), 3 rows, 4 columns
matrixB (4*3),
and result (3*3)
*/
/* step2: compute the result */
/* step3: output the result */
}
The values of matrices in your program can be hard-coded and any numbers you like(including the numbers of columns/rows and the values of matrices), which means you do not have to ask user to input those numbers. Of course you can do this if you would like to.
Directors to position audiences
: After researching a topic of your choice with a focus on the techniques used by writers and directors to position audiences,you are to write an analytical exposition in which you:
|
What has happened to the price of crude oil in 2015
: What has happened to the price of crude oil in 2015? What has happened to the demand for crude oil in 2015? Is there an economic theory that supports this relationship? Support your answer with a diagram.
|
What is the rate of interest is charging
: Idlewild Bank has granted you a seven year loan for $50,000. If your seven annual end of the year payments are $11,660.45, what is the rate of interest Idlewild is charging
|
Effect of appropriate strategic models
: 1: Evaluate the importance and effect of appropriate strategic models to organisations. 2: Achieve a depth of critical analysis of a given situation.
|
Write a program to multiply two matrices.
: The values of matrices in your program can be hard-coded and any numbers you like(including the numbers of columns/rows and the values of matrices), which means you do not have to ask user to input those numbers. Of course you can do this if you w..
|
In order to qualify for the favorable tax treatment
: In order to qualify for the favorable tax treatment of a Foreign Sales Corporation, a U.S. firm must meet all of the following tests, except: a. at least one director must be a nonresident of the U.S. b. its income must be derived from qualified expo..
|
How does an x-ray make an image of the body
: How does an x-ray make an image of the body? It should in a powerpoint slide show because im gonna present it and the assignment has to be explained u.
|
What is your portfolio return
: Year-to-date, Yum Brands had earned a 4.40 percent return. During the same time period, Raytheon earned 4.93 percent and Coca-Cola earned −0.60 percent. If you have a portfolio made up of 40 percent Yum Brands, 40 percent Raytheon, and 20 percent Coc..
|
What is net present value of project
: HealthWorks Inc, a chain of workout facilities, is looking at a new type of exercise equipment for all of its stores. The total amount of investment will be $250 today and the equipment is expected to last for 5 years with no salvage value. What is t..
|