Update MP2 (idk anymore)

This commit is contained in:
2024-03-10 00:49:58 -06:00
parent 756d08231a
commit 53268a2dc0
25 changed files with 3584 additions and 946 deletions

View File

@@ -27,6 +27,7 @@ int main(){
std::vector<std::vector<int>> vector;
std::vector<std::tuple<int, int>> highlightTuple; // collection of tuples to highlight
std::tuple result = {0, 0};
int currentResult;
int ch;
static int selection = 0;
static int * selectionPointer = &selection;
@@ -64,14 +65,28 @@ int main(){
printf("getAverage: %i\n", getAverage(vector));
printf("getRowTotal 0: %i\n", getRowTotal(vector, 0));
printf("getColumnTotal 0: %i\n", getColumnTotal(vector, 0));
highlightTuple.push_back(binarySearch(vector, getHighestInRow(vector, 0)));
printf("getHighestInRow 0: %i\n", getHighestInRow(vector, 0));
highlightTuple.push_back(binarySearch(vector, getHighestInColumn(vector, 0)));
printf("getHighestInColumn 0: %i\n", getHighestInColumn(vector, 0));
highlightTuple.push_back(binarySearch(vector, getLowestInRow(vector, 3)));
currentResult = getHighestInRow(vector, 0);
highlightTuple.push_back(binarySearch(vector, currentResult));
printf("getHighestInRow 0: %i\n", currentResult);
printf("tuple result: %i, %i\n", get<0>(highlightTuple[0]), get<1>(highlightTuple[0]));
currentResult = getHighestInColumn(vector, 0);
highlightTuple.push_back(binarySearch(vector, currentResult));
printf("getHighestInColumn 0: %i\n", currentResult);
printf("tuple result: %i, %i\n", get<0>(highlightTuple[1]), get<1>(highlightTuple[1]));
currentResult = getLowestInRow(vector, 3);
highlightTuple.push_back(binarySearch(vector, currentResult));
printf("getLowestInRow 3: %i\n", getLowestInRow(vector, 3));
highlightTuple.push_back(binarySearch(vector, getLowestInColumn(vector, 3)));
printf("tuple result: %i, %i\n", get<0>(highlightTuple[2]), get<1>(highlightTuple[2]));
currentResult = getLowestInColumn(vector, 3);
highlightTuple.push_back(binarySearch(vector, currentResult));
printf("getLowestInColumn 3: %i\n", getLowestInColumn(vector, 3));
printf("tuple result: %i, %i\n", get<0>(highlightTuple[3]), get<1>(highlightTuple[3]));
printf("2D Vector: %s \n", printVector(vector, highlightTuple).c_str());
cout << "Press Enter to Continue";
getchar();