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

  Program that displays the approximate number of customers

Write a program that displays the approximate number of customers in the survey who purchase one or more energy drinks per week.

  Create two arrays with ten random numbers

Determine the largest difference (only subtract corresponding index numbers) between these two arrays. (hint: create a third array with the differences)

  Write c program-visual studio to scan multiple text files

Write program in C or C++ and Visual Studio to scan multiple text files and count number of occurrences of each word in those files. Use binary tree to keep track of all words.

  Prepare a c program to read in a word from a user

Prepare a C program to read in a word from a user and check if that word is a palindrome :a word, phrase, or sequence that reads the same backward as forward.

  C++ is not case sensitive

C++ is not case sensitive, Declarations can be placed anywhere in the program, Statement and declarations must end with a semicolon

  Write program that print a diamond shape featuring asterisk

For this assignment, we will need to write a c++ program that is print out a diamond shape featuring the * asterisk to the console window. Please submit .cpp file.

  Allows you to enter 10 phonecalls into an array

Create a main() function that allows you to enter 10 PhoneCalls into an array. If a PhoneCall is already been placed to a number, do not allow a second PhoneCall to the same number

  State the purpose of the function

You may be asked to create a function to solve each of the tasks given below. For each task state the purpose of the function, what the function needs complete the task (input), what the function will send back to the function call (output), and t..

  Create a variable that asks user what their monthly income

On average people in Las Cruces spend between 12-16% of their annual income on entertainment. Create a variable that asks the user what their MONTHLY income is and have an fprintf statement that says

  Demonstrate your code compiles and runs for a test case

Use a For loop to iterate through the array and input the values. Demonstrate your code compiles and runs for a test case of your choice.

  Operating system and cpu scheduling

Operating System and CPU Scheduling

  Create a void function that takes as parameters

Create a void function that takes as parameters two integers, adds them, and prints them out to the command line.

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