From 494f8713d52d648329c716618e3e9a86ce54bfb4 Mon Sep 17 00:00:00 2001 From: T4rtP1ck13 <85512841+T4rtP1ck13@users.noreply.github.com> Date: Tue, 22 Jun 2021 21:10:06 -0500 Subject: [PATCH] Revert "I forgot to save the files before commiting, sorry" This reverts commit 368d3ac16f2427d230aa4c72c0b3a9bcc9dca4aa. --- Calculator.cpp | 7 ------- CalculatorFunctions.cpp | 10 +--------- CalculatorFunctions.h | 1 - 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Calculator.cpp b/Calculator.cpp index 5d1bc0d..34d4fa7 100644 --- a/Calculator.cpp +++ b/Calculator.cpp @@ -11,13 +11,11 @@ int main() bool loop = true; while (loop) { - //asks YOU that dumb question thing I made lol std::cout << "Please select an option from the list:\n"; std::cout << "1: Add | 2: Subtract | 3: Divide | 4: Multiply | 5: Square root \n"; std::cout << "\n"; std::cin >> option; std::cout << "\n"; - //asks your compooter a question switch (option) { case 1: @@ -38,23 +36,19 @@ int main() total_num = square_root("Square root", false); break; } - //Asks YOU ANOTHER DUMB, STUPID QUESTION! std::cout << "Please choose an option from the list:" << '\n'; std::cout << "1: Continue | 2: Conitnue with number from last problem | 3: Exit the program" << '\n'; std::cin >> end_option; - //compooter question if (end_option == 1) { loop = true; } - //JEEZ!!! How many compooter questions are there????????!!!! else if (end_option == 2) { std::cout << "Please select an option from the list:\n"; std::cout << "1: Add | 2: Subtract | 3: Divide | 4: Multiply | 5: Square root \n"; int option2; std::cin >> option2; - //MORE!???? switch (option2) { case 1: @@ -74,7 +68,6 @@ int main() break; } } - //EVEN MOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORE?????!!!!!!!!!!!????!?!??!?!?!? else if (end_option == 3) { loop = false; diff --git a/CalculatorFunctions.cpp b/CalculatorFunctions.cpp index 6cbfec0..565ecf5 100644 --- a/CalculatorFunctions.cpp +++ b/CalculatorFunctions.cpp @@ -6,14 +6,11 @@ using namespace std; static double ans = 0; bool loop2 = true; -//Yeah, this is like um a thing that makes your computer do... stuff double math(std::string text, std::function code, bool use_last_num, std::string math_symbol) { - //Don't worry about these it's just like a thing that makes your computer like store data double total_num = 0; double num1 = 0; double num2 = 0; - //This like.. asks your computer like um like um uh asks your computer a question if (!use_last_num) { std::cout << text << "\n"; @@ -27,7 +24,6 @@ double math(std::string text, std::function code, bool u std::cout << num1 << math_symbol << num2 << " = " << total_num << "\n"; std::cout << "\n"; } - //This just asks your computer another question, Don't worry about it else { std::cout << text << "\n" << "\n"; @@ -42,11 +38,9 @@ double math(std::string text, std::function code, bool u } return total_num; } -//moooooooooooore stuffffffffffffffffffffffffffffff double square_root(std::string text, bool use_last_num) { double total_num; - //asks ANOTHER question if (!use_last_num) { std::cout << text << '\n'; @@ -58,12 +52,10 @@ double square_root(std::string text, bool use_last_num) std::cout << "The square root of " << sqrt_num << " = " << total_num << "\n"; std::cout << "\n"; } - //and ANOTHER else { total_num = sqrt(ans); std::cout << "The square root of " << ans << " = " << total_num; } return total_num; -} -//Phew, we're done \ No newline at end of file +} \ No newline at end of file diff --git a/CalculatorFunctions.h b/CalculatorFunctions.h index ddea6e5..d33f5da 100644 --- a/CalculatorFunctions.h +++ b/CalculatorFunctions.h @@ -1,6 +1,5 @@ #include #include #include -//Just don't worry about ANYTHING, OK? double math(std::string text, std::function code, bool use_last_num, std::string math_symbol); double square_root(std::string, bool use_last_num); \ No newline at end of file