2. You are going to create a matrix calculator. In your calculator you should be
ID: 3558909 • Letter: 2
Question
2. You are going to create a matrix calculator. In your calculator you should be able to Add, Subtract and
Multiply two 3x3 matrices together. You will need three functions for your three operations, and each
function has some loops inside to do the operations. Your program should start with a main menu, having
both matrices as full zero matrices. You should put two menu options for changing the values of each
matrix, three menu options for three matrix operations, and two menu options for copying the results into
each of the matrices.
To make matrix graphic form, you can use characters 179, 191, 192, 217 and 218. C PROGRAM
1) A = ?
2) B = ?
3) A + B
4) A
Explanation / Answer
#include <stdio.h>
#include <stdlib.h>
void enterA(int A[3][3]);
void enterB(int B[3][3]);
void addAB(int A[3][3],int B[3][3],int C[3][3]);
void subtractAB(int A[3][3],int B[3][3],int C[3][3]);
void multiplyAB(int A[3][3],int B[3][3],int C[3][3]);
void copyA(int A[3][3],int B[3][3]);
void copyB(int A[3][3],int B[3][3]);
int main()
{
int choice;
int A[3][3],B[3][3],C[3][3];
x:
printf("1) A = ? ");
printf("2) B = ? ");
printf("3) A + B ");
printf("4) A
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.