From 48f21bdb13aff49173a2cd8888453a61c22214f3 Mon Sep 17 00:00:00 2001 From: Susana Sandoval Date: Mon, 2 Feb 2026 11:14:53 -0800 Subject: [PATCH 1/2] first push --- main.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/main.cpp b/main.cpp index a495fc94..93918ff9 100644 --- a/main.cpp +++ b/main.cpp @@ -12,10 +12,31 @@ int main() std::cout << "Addition: " << x + y << std::endl; std::cout << "Subtraction: " << x - y << std::endl; std::cout << "Multiplication: " << x * y << std::endl; + if(y == 0) { + std::cout << "Dividing by zero is ot a number.\n"; + } else { 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; return 0; } + +/* + +Compiling and running +g++ main.cpp +./a.out + +To add the file to the staging area before pushing +git add main.cpp + +Commit changes with message +git commit -m "description of what the changes accomplished" + +Push changes to github +git push main.cpp + +/* \ No newline at end of file From 888dfff00454d022073d6b051e602ad0e68f8f37 Mon Sep 17 00:00:00 2001 From: Susana Sandoval Date: Mon, 2 Feb 2026 13:12:49 -0800 Subject: [PATCH 2/2] x05 Resolve Merge Conflict --- main.cpp | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index a495fc94..964777d2 100644 --- a/main.cpp +++ b/main.cpp @@ -3,19 +3,41 @@ int main() { - std::cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; - std::cout << "Hi, please enter two whole numbers: "; + + + cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; + cout << "Hi, please enter two whole numbers: "; 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; + cin >> x >> y; + cout << "Addition: " << x + y << endl; + cout << "Subtraction: " << x - y << endl; + cout << "Multiplication: " << x * y << endl; + cout << "Dividing by zero is ot a number.\n"; + cout << "Division: " << x / y << endl; + cout << "Remainder: " << x % y << endl; + cout << "Square Root: " << sqrt(x) << endl; + cout << "Square: " << pow(x, y) << endl; return 0; } + +/* + +Compiling and running +g++ main.cpp +./a.out + +To add the file to the staging area before pushing +git add main.cpp + +Commit changes with message +git commit -m "description of what the changes accomplished" + +Push changes to github +git push main.cpp + + + +*/