Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a Matrix Calculator in C that performs matrix addition, subtraction, scalar multiplication and matrix multiplication using User Defined Functions. The user should be able

image text in transcribed
Design a Matrix Calculator in C that performs matrix addition, subtraction, scalar multiplication and matrix multiplication using User Defined Functions. The user should be able to choose the operation they want to perform from a menu that loops. The User Defined Functions are given with each menu operation below. Matricies can be of any size, but your program needs to test for operation size errors. If the operation cannot be done, print an error message. Menu idea: MATRIX CALCULATOR Enter an operation: Associated User Defined Function 1- Add two matricies 2 - Subtract two matricies 3 - Scalar Multiply one matrix 4 - Multiple two matricies void matrixAddSub (int array1[10](10], int array2[10j[10), etc) uses same User Defined Function above void matriScalarMultiplyfint array1[10]/10J, etc) void matrixMultiply (int array1[10][10], int array2[10)[10], etc); (message if 1 to 4 not entered) You must also include User Defined functions for a readMatrix and a printMatrix void readMatrix(int array1[10][10], int rows, int columns) void printMatrix(int array1[10)][10], int rows, int columns) Test Cases: 1 3 -2 [5 2 1 [6 5-3 4 2 3 +3 27 3 5 15 443 23 82 [4 2 1]-[ 23Error Message: Size Error - cannot subtract. -2 4 4] (User should not have to enter 3 -3 4 -9 12 6 9 12 7 10 13 8 11 14 o 1 Error Message: Size Error - cannot multiply. 4 6 10] [1 46 753 27 5 93 42 92 70 60 102 9 0 11 31 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions