//Code by Jordan Harris-Toovy (jordan.harristoovy@oit.edu) and Rayyan Ansari (rayyan.ansari@oit.edu) for OIT's CST116-01P project 3, December 2021 #include "mainHeader.h" int main() { float arr1[3][3]{ 0.0F }, arr2[3][3]{ 0.0F }, arr3[3][3]{ 0.0F }; int menuVal = 0, displayNumberLength = 5; bool validChoice = false; cout << "Plase enter the first matrix:" << endl; //Get both arrays from the user arrayInput(arr1); cout << "Plase enter the second matrix:" << endl; arrayInput(arr2); cout << "Enter desired operation: \n1) Add the first matrix to the second\n2) Multiply the second matrix by the first" << "\n3) Multiply the first matrix by the second" << endl; while (!validChoice) //Get user menu choice and validate it { validChoice = getInt(menuVal); if ((menuVal > 3) || (menuVal < 1) || !validChoice) { cout << "Invalid entry, enter again:"; validChoice = false; } } switch (menuVal) { case (1): //Addition of arr1 and arr2 into arr3 addArrays(arr1, arr2, arr3); displayTriArray(arr1, arr2, arr3, '+'); break; case (2): //Multiplication of arr2 by arr1 into arr3 multiplyArrays(arr1, arr2, arr3); displayTriArray(arr1, arr2, arr3, 'X'); break; case (3): //Multiplication of arr1 by arr2 into arr3 multiplyArrays(arr2, arr1, arr3); displayTriArray(arr2, arr1, arr3, 'X'); break; } return (0); }