Write a program to multiply two matrices.

Assignment Help C/C++ Programming
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.

Reference no: EM13937655

Questions Cloud

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..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd