From 499e70fec796c9fa42aa29d631dc783a2a302005 Mon Sep 17 00:00:00 2001 From: ImagenL Date: Mon, 8 Sep 2025 11:27:09 -0700 Subject: [PATCH 1/2] add display at beginning, closes #62 --- main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index 958ba61..bd06927 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 a remainder 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 475aad50854b9f0ab05bcf5cd38dd7710d9261b5 Mon Sep 17 00:00:00 2001 From: ImagenL Date: Wed, 10 Sep 2025 11:43:57 -0700 Subject: [PATCH 2/2] re-added additional functionality --- main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.cpp b/main.cpp index a495fc9..0da81ff 100644 --- a/main.cpp +++ b/main.cpp @@ -9,13 +9,13 @@ int main() int x,y; std::cin >> x >> y; - std::cout << "Addition: " << x + y << std::endl; - std::cout << "Subtraction: " << x - y << std::endl; - std::cout << "Multiplication: " << x * y << std::endl; - std::cout << "Division: " << x / y << std::endl; - std::cout << "Remainder: " << x % y << std::endl; - std::cout << "Square Root: " << sqrt(x) << std::endl; - std::cout << "Square: " << pow(x, y) << std::endl; - + std::cout << "Addition: " << x << "+" y << "=" << x + y << std::endl; + std::cout << "Subtraction: " << x << "-" << y << "=" << x - y << std::endl; + std::cout << "Multiplication: " << x << "*" << y << "=" << x * y << std::endl; + std::cout << "Division: " << x << "/" << y << "=" << x / y << " with a remainder 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 << "Square: " << x << "^" << y << "=" << pow(x, y) << std::endl; + return 0; }