summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schroeder <[email protected]>2021-11-25 00:02:38 -0800
committerBenjamin Schroeder <[email protected]>2021-11-25 00:02:38 -0800
commit956c604dac3b8a002ce06e284db07c561e9f2a56 (patch)
treecbb9322f33713c319cc057c333be545de6956f71
parentAdd .gitignore and .gitattributes. (diff)
downloadproject_3_hernandez_schroeder-956c604dac3b8a002ce06e284db07c561e9f2a56.tar.xz
project_3_hernandez_schroeder-956c604dac3b8a002ce06e284db07c561e9f2a56.zip
Add project files.
-rw-r--r--Project3_Hernandez_Schroeder.sln31
-rw-r--r--Project3_Hernandez_Schroeder/CODE.txt423
-rw-r--r--Project3_Hernandez_Schroeder/Project3.h15
-rw-r--r--Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.cpp288
-rw-r--r--Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj150
-rw-r--r--Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj.filters27
6 files changed, 934 insertions, 0 deletions
diff --git a/Project3_Hernandez_Schroeder.sln b/Project3_Hernandez_Schroeder.sln
new file mode 100644
index 0000000..e07f766
--- /dev/null
+++ b/Project3_Hernandez_Schroeder.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31702.278
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project3_Hernandez_Schroeder", "Project3_Hernandez_Schroeder\Project3_Hernandez_Schroeder.vcxproj", "{092C87AF-A913-4FE1-B64A-B62E8F690390}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Debug|x64.ActiveCfg = Debug|x64
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Debug|x64.Build.0 = Debug|x64
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Debug|x86.ActiveCfg = Debug|Win32
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Debug|x86.Build.0 = Debug|Win32
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Release|x64.ActiveCfg = Release|x64
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Release|x64.Build.0 = Release|x64
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Release|x86.ActiveCfg = Release|Win32
+ {092C87AF-A913-4FE1-B64A-B62E8F690390}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {6AEE1948-1F52-496E-9D67-CB3B4DB2A4AC}
+ EndGlobalSection
+EndGlobal
diff --git a/Project3_Hernandez_Schroeder/CODE.txt b/Project3_Hernandez_Schroeder/CODE.txt
new file mode 100644
index 0000000..bf3bf6a
--- /dev/null
+++ b/Project3_Hernandez_Schroeder/CODE.txt
@@ -0,0 +1,423 @@
+// Project3_Hernandez_Schroeder.cpp : This file contains the 'main' function. Program execution begins and ends there.
+
+
+#include <iostream>
+using namespace std;
+
+float MatrixA[3][3]{};
+float MatrixB[3][3]{};
+float MatrixC[3][3]{};
+int menuChoice;
+
+void DisplayMenu();
+void getMatrices();
+void multiplyMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3][3]);
+void addMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3][3]);
+
+
+int main()
+{
+ cout << "*****************************************************\n";
+ cout << " \t 3x3 Matrix Calculator\n";
+ cout << "*****************************************************\n";
+ cout << "(Before we start, we need two 3x3 Matrices, A and B)\n";
+
+ //Ask for two matrices to do calculations upon
+ getMatrices();
+
+ return 0;
+}
+
+
+
+void DisplayMenu()
+{
+ cout << "\t1) Get New Matrices\n";
+ cout << "\t2) Multiply Matrices\n";
+ cout << "\t3) Add Matrices\n";
+ cout << "\t4) Exit\n";
+ menuChoice = 0;
+ while (menuChoice < 1 || menuChoice>4)
+ {
+ cout << "\nSelect from the menu above: ";
+ cin >> menuChoice;
+ }
+ switch (menuChoice)
+ {
+ case 1:
+ {
+ getMatrices();
+ break;
+ }
+ case 2:
+ {
+ multiplyMatrices(MatrixA, MatrixB, MatrixC);
+ break;
+ }
+ case 3:
+ {
+ addMatrices(MatrixA, MatrixB, MatrixC);
+ break;
+ }
+ case 4:
+ {
+ cout << "\tThank You, Good Bye!!\n\n";
+ break;
+ }
+ }
+}
+
+
+void getMatrices()
+{
+ cout << "\nEnter the elements of Matrix A (by row): \n";
+ for (int i = 0; i < 3; i++)
+ {
+ cout << "row " << i + 1 << "\n";
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "element " << j + 1 << ": ";
+ cin >> MatrixA[i][j];
+ }
+ }
+ cout << "\nEnter the Elements of Matrix B (by row):" << endl;
+ for (int i = 0; i < 3; i++)
+ {
+ cout << "row " << i + 1 << "\n";
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "element " << j + 1 << ": ";
+ cin >> MatrixB[i][j];
+ }
+ }
+ cout << "\n\n Matrix A:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixA[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n Matrix B:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixB[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n\n";
+
+ DisplayMenu();
+}
+
+void multiplyMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3][3])
+{
+ // Calculate A X B = C
+ // Top row of C
+ MatrixC[0][0] = (MatrixA[0][0] * MatrixB[0][0]) + (MatrixA[0][1] * MatrixB[1][0]) + (MatrixA[0][2] * MatrixB[2][0]);
+ MatrixC[0][1] = (MatrixA[0][0] * MatrixB[0][1]) + (MatrixA[0][1] * MatrixB[1][1]) + (MatrixA[0][2] * MatrixB[2][1]);
+ MatrixC[0][2] = (MatrixA[0][0] * MatrixB[0][2]) + (MatrixA[0][1] * MatrixB[1][2]) + (MatrixA[0][2] * MatrixB[2][2]);
+ // 2nd row of C
+ MatrixC[1][0] = (MatrixA[1][0] * MatrixB[0][0]) + (MatrixA[1][1] * MatrixB[1][0]) + (MatrixA[1][2] * MatrixB[2][0]);
+ MatrixC[1][1] = (MatrixA[1][0] * MatrixB[0][1]) + (MatrixA[1][1] * MatrixB[1][1]) + (MatrixA[1][2] * MatrixB[2][1]);
+ MatrixC[1][2] = (MatrixA[1][0] * MatrixB[0][2]) + (MatrixA[1][1] * MatrixB[1][2]) + (MatrixA[1][2] * MatrixB[2][2]);
+ // 3rd row of C
+ MatrixC[2][0] = (MatrixA[2][0] * MatrixB[0][0]) + (MatrixA[2][1] * MatrixB[1][0]) + (MatrixA[2][2] * MatrixB[2][0]);
+ MatrixC[2][1] = (MatrixA[2][0] * MatrixB[0][1]) + (MatrixA[2][1] * MatrixB[1][1]) + (MatrixA[2][2] * MatrixB[2][1]);
+ MatrixC[2][2] = (MatrixA[2][0] * MatrixB[0][2]) + (MatrixA[2][1] * MatrixB[1][2]) + (MatrixA[2][2] * MatrixB[2][2]);
+
+ //print out results
+ cout << "\n\t MATRIX MULTIPLICATION\n Matrix A:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixA[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n Matrix B:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixB[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n A X B = C:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixC[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n\n";
+
+ DisplayMenu();
+}
+
+void addMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3][3])
+{
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ MatrixC[i][j] = MatrixA[i][j] + MatrixB[i][j];
+ }
+ }
+
+ //print out results
+ cout << "\n\t MATRIX ADDITION\n Matrix A:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixA[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n Matrix B:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixB[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n A + B = C:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixC[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n\n";
+
+ DisplayMenu();
+}
+
+// ///////////////////////////////// RUN ////////////////////////////////////
+
+
+*****************************************************
+ 3x3 Matrix Calculator
+*****************************************************
+(Before we start, we need two 3x3 Matrices, A and B)
+
+Enter the elements of Matrix A (by row):
+row 1
+element 1: 2
+element 2: 3
+element 3: 2
+row 2
+element 1: 3
+element 2: 4
+element 3: 3
+row 3
+element 1: 6
+element 2: 5
+element 3: 7
+
+Enter the Elements of Matrix B (by row):
+row 1
+element 1: 8
+element 2: 7
+element 3: 6
+row 2
+element 1: 4
+element 2: 5
+element 3: 6
+row 3
+element 1: 2
+element 2: 3
+element 3: 5
+
+
+ Matrix A:
+ 2 3 2
+ 3 4 3
+ 6 5 7
+
+ Matrix B:
+ 8 7 6
+ 4 5 6
+ 2 3 5
+
+
+ 1) Get New Matrices
+ 2) Multiply Matrices
+ 3) Add Matrices
+ 4) Exit
+
+Select from the menu above: 3
+
+ MATRIX ADDITION
+ Matrix A:
+ 2 3 2
+ 3 4 3
+ 6 5 7
+
+ Matrix B:
+ 8 7 6
+ 4 5 6
+ 2 3 5
+
+ A + B = C:
+ 10 10 8
+ 7 9 9
+ 8 8 12
+
+
+ 1) Get New Matrices
+ 2) Multiply Matrices
+ 3) Add Matrices
+ 4) Exit
+
+Select from the menu above: 2
+
+ MATRIX MULTIPLICATION
+ Matrix A:
+ 2 3 2
+ 3 4 3
+ 6 5 7
+
+ Matrix B:
+ 8 7 6
+ 4 5 6
+ 2 3 5
+
+ A X B = C:
+ 32 35 40
+ 46 50 57
+ 82 88 101
+
+
+ 1) Get New Matrices
+ 2) Multiply Matrices
+ 3) Add Matrices
+ 4) Exit
+
+Select from the menu above: 4
+ Thank You, Good Bye!!
+
+
+C:\Users\Lenovo\source\repos\Project3_Hernandez_Schroeder\Debug\Project3_Hernandez_Schroeder.exe (process 14836) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+
+*****************************************************
+ 3x3 Matrix Calculator
+*****************************************************
+(Before we start, we need two 3x3 Matrices, A and B)
+
+Enter the elements of Matrix A (by row):
+row 1
+element 1: 2.67
+element 2: 4.54
+element 3: 3.89
+row 2
+element 1: 2.432
+element 2: 6.765
+element 3: 4.876
+row 3
+element 1: 3.2
+element 2: 3.9
+element 3: 2.1
+
+Enter the Elements of Matrix B (by row):
+row 1
+element 1: 1.89
+element 2: .79
+element 3: .90
+row 2
+element 1: .321
+element 2: 4.5
+element 3: 3.76543
+row 3
+element 1: 2.0
+element 2: 2.8
+element 3: 12.15
+
+
+ Matrix A:
+ 2.67 4.54 3.89
+ 2.432 6.765 4.876
+ 3.2 3.9 2.1
+
+ Matrix B:
+ 1.89 0.79 0.9
+ 0.321 4.5 3.76543
+ 2 2.8 12.15
+
+
+ 1) Get New Matrices
+ 2) Multiply Matrices
+ 3) Add Matrices
+ 4) Exit
+
+Select from the menu above: 2
+
+ MATRIX MULTIPLICATION
+ Matrix A:
+ 2.67 4.54 3.89
+ 2.432 6.765 4.876
+ 3.2 3.9 2.1
+
+ Matrix B:
+ 1.89 0.79 0.9
+ 0.321 4.5 3.76543
+ 2 2.8 12.15
+
+ A X B = C:
+ 14.2836 33.4313 66.7616
+ 16.52 46.0166 86.9053
+ 11.4999 25.958 43.0802
+
+
+ 1) Get New Matrices
+ 2) Multiply Matrices
+ 3) Add Matrices
+ 4) Exit
+
+Select from the menu above: 3
+
+ MATRIX ADDITION
+ Matrix A:
+ 2.67 4.54 3.89
+ 2.432 6.765 4.876
+ 3.2 3.9 2.1
+
+ Matrix B:
+ 1.89 0.79 0.9
+ 0.321 4.5 3.76543
+ 2 2.8 12.15
+
+ A + B = C:
+ 4.56 5.33 4.79
+ 2.753 11.265 8.64143
+ 5.2 6.7 14.25
+
+
+ 1) Get New Matrices
+ 2) Multiply Matrices
+ 3) Add Matrices
+ 4) Exit
+
+Select from the menu above: 4
+ Thank You, Good Bye!!
+
+
+C:\Users\Lenovo\source\repos\Project3_Hernandez_Schroeder\Debug\Project3_Hernandez_Schroeder.exe (process 26268) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
diff --git a/Project3_Hernandez_Schroeder/Project3.h b/Project3_Hernandez_Schroeder/Project3.h
new file mode 100644
index 0000000..26bfed1
--- /dev/null
+++ b/Project3_Hernandez_Schroeder/Project3.h
@@ -0,0 +1,15 @@
+#pragma once
+
+
+#include <iostream>
+using namespace std;
+
+float MatrixA[3][3]{};
+float MatrixB[3][3]{};
+float MatrixC[3][3]{};
+int menuChoice;
+
+void DisplayMenu();
+void getMatrices();
+void multiplyMatrices(float[3][3], float[3][3], float[3][3]);
+void addMatrices(float[3][3], float[3][3], float[3][3]); \ No newline at end of file
diff --git a/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.cpp b/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.cpp
new file mode 100644
index 0000000..dd2d312
--- /dev/null
+++ b/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.cpp
@@ -0,0 +1,288 @@
+// Project3_Hernandez_Schroeder.cpp : This file contains the 'main' function. Program execution begins and ends there.
+//
+// Written by Ben Schroeder and Freddy Hernandez
+// date: 11/23/2021 and periodically updated up to 12//2021
+//
+// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Meetings:
+// 11/23/2021 Via email: Just discussed a potential gameplan for the project. Decided we would individually look over the problem in
+// the next few days and check back with each other in the next few days as well.
+//
+//
+//
+// Code Updates:
+// 11/24/2021 Wrote several functions for the program.
+//
+//
+//
+//
+// AGILE QUESTIONS for Benjamin Schroeder
+// (ie 1)What specific task? 2)What do I know about the specific task? 3)What do I not know about the specific task? )
+// 11/24/2021
+// 1) I will begin to draw up psuedocode for the functions in the project,
+// 2) I know how to do most of the operations involved in the project, however,
+// 3) I do not know how exactly to build the addition and multiplication tables.
+// 11/26/2021
+//
+//
+//
+// AGILE QUESTIONS for Freddy Hernandez
+// (ie 1)What specific task? 2)What do I know about the specific task? 3)What do I not know about the specific task? )
+//
+//
+//
+//
+//
+//Testing Plan:
+// Enter several types of inputs into the matrices... compare the outputs to a scientific calculator for accuracy
+// Run
+//
+//
+//
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//PSUEDOCODE:
+//
+// From main(), Display a banner with a brief description of the program...
+// Ask for the initial two matrices to be either multiplied or added together
+// then call getMatrices();
+//
+///////////////////////////////////
+// void DisplayMenu()
+// Show menu options
+// int menuChoice = somenumber
+// ask for an option between 1 and 4
+// record "menuChoice" entered
+// while ...the option number entered is out of that range
+// ask for a selection 1-4
+// switch case 1-4
+// case 1: call getMatrices
+// case 2: call multiplyMatrices(A,B,C);
+// case 3: call addMatrices(A,B,C);
+// case 4: exit the program
+//
+//
+////////////////////////////////////////
+// void getMatrices()
+// ask for individual elements of the first matrix (by row)
+// ask for individual elements of the second matrix
+//
+// print out both matrices on the screen for the user to see
+//
+// then call DisplayMenu();
+//
+///////////////////////////////////////////
+// void multiplyMatrices(A,B,C)
+// do the calculation for matrix multiplication (row by row)
+//
+// display the 3 matrices A, B, and C (the multiplication result)
+//
+// then call DisplayMenu();
+//
+/////////////////////////////////////////////
+// void addMatrices(A,B,C)
+// do the calculation for matrix addition (element by element)
+// display the 3 matrices A, B, and C (the addition result)
+//
+// Then Call DisplayMenu(); to start the program back through
+//
+//
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+#include "Project3.h"
+
+int main()
+{
+ cout << "*****************************************************\n";
+ cout << " \t 3x3 Matrix Calculator\n";
+ cout << "*****************************************************\n";
+ cout << "(Before we start, we need two 3x3 Matrices, A and B)\n";
+
+ //Ask for two matrices to do calculations upon
+ getMatrices();
+
+ return 0;
+}
+
+
+
+
+void DisplayMenu()
+{
+ cout << "\t1) Get New Matrices\n";
+ cout << "\t2) Multiply Matrices\n";
+ cout << "\t3) Add Matrices\n";
+ cout << "\t4) Exit\n";
+ menuChoice = 0;
+ while (menuChoice < 1 || menuChoice>4)
+ {
+ cout << "\nSelect from the menu above: ";
+ cin >> menuChoice;
+ }
+ switch (menuChoice)
+ {
+ case 1:
+ {
+ getMatrices();
+ break;
+ }
+ case 2:
+ {
+ multiplyMatrices(MatrixA, MatrixB, MatrixC);
+ break;
+ }
+ case 3:
+ {
+ addMatrices(MatrixA, MatrixB, MatrixC);
+ break;
+ }
+ case 4:
+ {
+ cout << "\tThank You, Good Bye!!\n\n";
+ break;
+ }
+ }
+}
+
+void getMatrices()
+{
+ cout << "\nEnter the elements of Matrix A (by row): \n";
+ for (int i = 0; i < 3; i++)
+ {
+ cout << "row " << i + 1 << "\n";
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "element " << j + 1 << ": ";
+ cin >> MatrixA[i][j];
+ }
+ }
+ cout << "\nEnter the Elements of Matrix B (by row):" << endl;
+ for (int i = 0; i < 3; i++)
+ {
+ cout << "row " << i + 1 << "\n";
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "element " << j + 1 << ": ";
+ cin >> MatrixB[i][j];
+ }
+ }
+ cout << "\n\n Matrix A:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixA[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n Matrix B:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixB[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n\n";
+
+ DisplayMenu();
+}
+
+void multiplyMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3][3])
+{
+ // Calculate A X B = C
+ // Top row of C
+ MatrixC[0][0] = (MatrixA[0][0] * MatrixB[0][0]) + (MatrixA[0][1] * MatrixB[1][0]) + (MatrixA[0][2] * MatrixB[2][0]);
+ MatrixC[0][1] = (MatrixA[0][0] * MatrixB[0][1]) + (MatrixA[0][1] * MatrixB[1][1]) + (MatrixA[0][2] * MatrixB[2][1]);
+ MatrixC[0][2] = (MatrixA[0][0] * MatrixB[0][2]) + (MatrixA[0][1] * MatrixB[1][2]) + (MatrixA[0][2] * MatrixB[2][2]);
+ // 2nd row of C
+ MatrixC[1][0] = (MatrixA[1][0] * MatrixB[0][0]) + (MatrixA[1][1] * MatrixB[1][0]) + (MatrixA[1][2] * MatrixB[2][0]);
+ MatrixC[1][1] = (MatrixA[1][0] * MatrixB[0][1]) + (MatrixA[1][1] * MatrixB[1][1]) + (MatrixA[1][2] * MatrixB[2][1]);
+ MatrixC[1][2] = (MatrixA[1][0] * MatrixB[0][2]) + (MatrixA[1][1] * MatrixB[1][2]) + (MatrixA[1][2] * MatrixB[2][2]);
+ // 3rd row of C
+ MatrixC[2][0] = (MatrixA[2][0] * MatrixB[0][0]) + (MatrixA[2][1] * MatrixB[1][0]) + (MatrixA[2][2] * MatrixB[2][0]);
+ MatrixC[2][1] = (MatrixA[2][0] * MatrixB[0][1]) + (MatrixA[2][1] * MatrixB[1][1]) + (MatrixA[2][2] * MatrixB[2][1]);
+ MatrixC[2][2] = (MatrixA[2][0] * MatrixB[0][2]) + (MatrixA[2][1] * MatrixB[1][2]) + (MatrixA[2][2] * MatrixB[2][2]);
+
+ //print out results
+ cout << "\n\t MATRIX MULTIPLICATION\n Matrix A:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixA[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n Matrix B:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixB[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n A X B = C:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixC[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n\n";
+
+ DisplayMenu();
+}
+
+void addMatrices(float MatrixA[3][3], float MatrixB[3][3], float MatrixC[3][3])
+{
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ MatrixC[i][j] = MatrixA[i][j] + MatrixB[i][j];
+ }
+ }
+
+ //print out results
+ cout << "\n\t MATRIX ADDITION\n Matrix A:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixA[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n Matrix B:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixB[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n A + B = C:\n";
+ for (int i = 0; i < 3; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ cout << "\t" << MatrixC[i][j] << "\t";
+ }
+ cout << "\n";
+ }
+ cout << "\n\n";
+
+ DisplayMenu();
+}
+
+
diff --git a/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj b/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj
new file mode 100644
index 0000000..e4f6c41
--- /dev/null
+++ b/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{092c87af-a913-4fe1-b64a-b62e8f690390}</ProjectGuid>
+ <RootNamespace>Project3HernandezSchroeder</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="Project3_Hernandez_Schroeder.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Project3.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj.filters b/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj.filters
new file mode 100644
index 0000000..06f5e8a
--- /dev/null
+++ b/Project3_Hernandez_Schroeder/Project3_Hernandez_Schroeder.vcxproj.filters
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Project3_Hernandez_Schroeder.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Project3.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file