Question: Please, Using C, not C+ or C++, Thanks. Files to submit: mat_add.c Time it took Matthew to Complete: 10 mins Requriements Program must compile with

Please, Using C, not C+ or C++, Thanks.

Files to submit: mat_add.c

Time it took Matthew to Complete: 10 mins

Requriements

Program must compile with both -Wall and -Werror options enabled

Submit only the files requested

Use doubles to store real numbers

Print all doubles to 2 decimal points unless stated otherwise

Restrictions

No global variables may be used

Your main function may only declare variables and call other functions

Description

Write a program that adds two matrices together. If you don't know how matrix addition works you can see this website for details: http://www.purplemath.com/modules/mtrxadd.htm

Details

The user will enter input in the following order

The number of rows

The number of columns

The values of matrix A

The values of matrix B

The maximum size of a matrix is 100 X 100

The matrices will not always be square (have the same number of rows and columns)

The matrix will be entered one line at a time

Assumptions

Input WILL always be valid

The values in the matrices will be integers

Examples

User input is underlined.

Example 1

Please enter the number of rows: 2 Please enter the number of columns: 2 Enter Matrix A 1 2 3 4 Enter Matrix B 100 200 200 400 A + B = 101 202 203 404

Example 2

Please enter the number of rows: 2 Please enter the number of columns: 3 Enter Matrix A 10 20 -30 1 2 7 Enter Matrix B 1 2 30 -3 4 5 A + B = 11 22 0 -2 6 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!