Question: It should show the same output as shown in the image and need to be done in c programming language. Please provide me as soon

It should show the same output as shown in the image and need to be done in c programming language. Please provide me as soon as possible.

It should show the same output as shown in the image andneed to be done in c programming language. Please provide me assoon as possible. The assignment In this assignment you will take theMatrix addition and subtraction code and modify it to utilize the following

The assignment In this assignment you will take the Matrix addition and subtraction code and modify it to utilize the following 1. Looping user input with menus in an AskUserinput function a. User decides which operation to use (add, subtract) on MatrixA and MatrixB b. User decides what scalar to multiply MatrixC by c. User can complete more than one operation or cancel. Please select the matrix operation 1- Matrix Addition A+ B 2-Matrix Subtraction A-B 3Scalar Multiplication sC 4-Cancel and Exit User Interface Please select the matzix operation 1 -Hatrix Addition + B 2-Matrix Subtraction AB 3 - Scalar Multiplication s * C 4-Cancel and Exit Please entez an integer scalar value User Interface when 3 is chosen 2. Error checking for user inputs, file open/close. Tell them their input is incorrect, and loop until they get it right or cancel. If the file is not there, tell the user the file is missing. 3. You will create a new functions, MatrixAddition() and MatrixScalarMultiplication) a. Inside Matrix Addition you will move the code necessary for addition. b. Inside Matrix Scalar Multiplication, you need to add the code necessary for scalar multiplication on only Matrix C. (see below) 4. Scalar Multiplication of MatrixC and a user input integer scalar value. The scalar multiplication output should be handled similar to the addition and subtraction. MatrixC Scalar MatrixC To find 2A, simply multiply each matrix entry by 2: 10 6 2.10 2 6 24 2.3 20 12 Output format for scalar multiplication: (Note, the user can enter ANY positive integer for the scalar) Matrix Scalar Multiplication Step 1 Scalar MatrixC Matzix Scalar Multiplication Step 2 ScalarHatri 20 20 2 0 20 20 2*0 20 20202 20 20 2 020 20 20 20 2*020 20 2020202020 Matrix Scalar Multiplication Step 3 10 5. Output all results to a file. Append each input into the current file to create a log file of the user's requests. Output to a File You must output the results to a file instead of using the screen. Filename should be MatrixManipulation.txt You need to make sure you append to the file so each operation will be stored in the file one after another Before every operation you need to output the following to the file: 1. 2. 3. Operation Start 4. At the end of each operation, you need to output the following to the file: Operation End 5. The output should be similar to this for each iteration. This way the user can see each operation in the file: Openasion Scart Hatrinh Matrix Subtzactien Scep 2 6. You must close the file when the user decides to exit the program. Extra Credit 1. 2. You will create a new function called MatrixDirectSum0) You will need to add an option in the user input to use this matrix manipulation a11... aln 00 aml amn 0 0...0b1 0 B bpg For instance 0 0 0 1 6 0 0 0 0 1 Since C does not have a symbol for the direct sum, use (+) instead. printf" (+)"//do not copy and paste this code. Write it yourself. The assignment In this assignment you will take the Matrix addition and subtraction code and modify it to utilize the following 1. Looping user input with menus in an AskUserinput function a. User decides which operation to use (add, subtract) on MatrixA and MatrixB b. User decides what scalar to multiply MatrixC by c. User can complete more than one operation or cancel. Please select the matrix operation 1- Matrix Addition A+ B 2-Matrix Subtraction A-B 3Scalar Multiplication sC 4-Cancel and Exit User Interface Please select the matzix operation 1 -Hatrix Addition + B 2-Matrix Subtraction AB 3 - Scalar Multiplication s * C 4-Cancel and Exit Please entez an integer scalar value User Interface when 3 is chosen 2. Error checking for user inputs, file open/close. Tell them their input is incorrect, and loop until they get it right or cancel. If the file is not there, tell the user the file is missing. 3. You will create a new functions, MatrixAddition() and MatrixScalarMultiplication) a. Inside Matrix Addition you will move the code necessary for addition. b. Inside Matrix Scalar Multiplication, you need to add the code necessary for scalar multiplication on only Matrix C. (see below) 4. Scalar Multiplication of MatrixC and a user input integer scalar value. The scalar multiplication output should be handled similar to the addition and subtraction. MatrixC Scalar MatrixC To find 2A, simply multiply each matrix entry by 2: 10 6 2.10 2 6 24 2.3 20 12 Output format for scalar multiplication: (Note, the user can enter ANY positive integer for the scalar) Matrix Scalar Multiplication Step 1 Scalar MatrixC Matzix Scalar Multiplication Step 2 ScalarHatri 20 20 2 0 20 20 2*0 20 20202 20 20 2 020 20 20 20 2*020 20 2020202020 Matrix Scalar Multiplication Step 3 10 5. Output all results to a file. Append each input into the current file to create a log file of the user's requests. Output to a File You must output the results to a file instead of using the screen. Filename should be MatrixManipulation.txt You need to make sure you append to the file so each operation will be stored in the file one after another Before every operation you need to output the following to the file: 1. 2. 3. Operation Start 4. At the end of each operation, you need to output the following to the file: Operation End 5. The output should be similar to this for each iteration. This way the user can see each operation in the file: Openasion Scart Hatrinh Matrix Subtzactien Scep 2 6. You must close the file when the user decides to exit the program. Extra Credit 1. 2. You will create a new function called MatrixDirectSum0) You will need to add an option in the user input to use this matrix manipulation a11... aln 00 aml amn 0 0...0b1 0 B bpg For instance 0 0 0 1 6 0 0 0 0 1 Since C does not have a symbol for the direct sum, use (+) instead. printf" (+)"//do not copy and paste this code. Write it yourself

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!