From f77deae81477a30267bde454acc2583caf6a2660 Mon Sep 17 00:00:00 2001 From: er02869 Date: Mon, 8 Sep 2025 11:45:44 -0700 Subject: [PATCH 1/2] Changed the operations output format --- main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.cpp b/main.cpp index 958ba61..5ddf1a5 100644 --- a/main.cpp +++ b/main.cpp @@ -9,16 +9,16 @@ int main() { cout << "Hi, please enter two whole numbers: "; - int x,y; + 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 << 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; return 0; } From df2905f1bc42ad8def4509c77fbd50d77179be3c Mon Sep 17 00:00:00 2001 From: er02869 Date: Wed, 10 Sep 2025 11:36:27 -0700 Subject: [PATCH 2/2] forgot power --- main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main.cpp b/main.cpp index 0545179..ab7aead 100644 --- a/main.cpp +++ b/main.cpp @@ -20,6 +20,7 @@ int main() 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 << " to the power of " << y << " is " << pow(x,y) << endl; return 0; }