From a065ae3daf50e589b9bc30e53192183744d3d0fc Mon Sep 17 00:00:00 2001 From: Jeijito Date: Mon, 8 Sep 2025 11:40:53 -0700 Subject: [PATCH 1/2] DIsplay math problem fixed Changed format of output to print wanted output. --- main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index 958ba61..f1efa81 100644 --- a/main.cpp +++ b/main.cpp @@ -12,13 +12,13 @@ int main() int x,y; cin >> x >> y; - cout << "Addition: " << x + y << endl; - cout << "Subtraction: " << x - y << endl; - cout << "Multiplication: " << x * y << endl; - cout << "Division: " << x / y << endl; - cout << "Remainder: " << x % y << endl; - cout << "Square Root: " << sqrt(x) << endl; - cout << "Square: " << pow(x, y) << endl; + cout << x << "+" << y << x + y << "=" << endl; + cout << x << "-" << y << "=" << x - y << endl; + cout << x << "*" << y << "=" << x * y << endl; + cout << x << "/" << y << "=" << x / y << " with reminder of " << x % y << endl; + cout << "Square root of " << x << " is " << sqrt(x) << endl; + cout << "Square root of " << y << " is " << sqrt(y) << endl; + cout << x << "^" << y << "=" << pow(x, y) << endl; return 0; } From a6ce6cad94782a3e117dec30873cdacba7066708 Mon Sep 17 00:00:00 2001 From: Jeijito Date: Wed, 10 Sep 2025 11:53:21 -0700 Subject: [PATCH 2/2] Resolve Merge Conflicts --- main.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/main.cpp b/main.cpp index f1efa81..d064421 100644 --- a/main.cpp +++ b/main.cpp @@ -1,24 +1,21 @@ #include #include -using std::cin; -using std::cout; -using std::endl; - int main() { - cout << "Hi, please enter two whole numbers: "; + std::cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; + std::cout << "Hi, please enter two whole numbers: "; int x,y; - cin >> x >> y; - cout << x << "+" << y << x + y << "=" << endl; - cout << x << "-" << y << "=" << x - y << endl; - cout << x << "*" << y << "=" << x * y << endl; - cout << x << "/" << y << "=" << x / y << " with reminder of " << x % y << endl; - cout << "Square root of " << x << " is " << sqrt(x) << endl; - cout << "Square root of " << y << " is " << sqrt(y) << endl; - cout << x << "^" << y << "=" << pow(x, y) << endl; + std::cin >> x >> y; + std::cout << x << "+" << y << x + y << "=" << std::endl; + std::cout << x << "-" << y << "=" << x - y << std::endl; + std::cout << x << "*" << y << "=" << x * y << std::endl; + std::cout << x << "/" << y << "=" << x / y << " with reminder of " << x % y << std::endl; + std::cout << "Square root of " << x << " is " << sqrt(x) << std::endl; + std::cout << "Square root of " << y << " is " << sqrt(y) << std::endl; + std::cout << x << "^" << y << "=" << pow(x, y) << std::endl; return 0; }