From 4e56717250c15f7abbe0888a28021f54ba81a659 Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Wed, 28 Jan 2026 11:48:24 -0800 Subject: [PATCH 1/8] Prevents divide by zero,resolves #61 --- main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main.cpp b/main.cpp index a495fc94..7ebd2fbc 100644 --- a/main.cpp +++ b/main.cpp @@ -13,6 +13,7 @@ int main() std::cout << "Subtraction: " << x - y << std::endl; std::cout << "Multiplication: " << x * y << std::endl; std::cout << "Division: " << x / y << std::endl; + std::cout << "Change" << 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; From fa61c15ca6857b9c21265f1fe53e88d18cf9476d Mon Sep 17 00:00:00 2001 From: Kevin Buffardi Date: Mon, 2 Feb 2026 11:27:48 -0800 Subject: [PATCH 2/8] Refactors out std:: closes #341 --- main.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index a495fc94..5411e7a3 100644 --- a/main.cpp +++ b/main.cpp @@ -1,21 +1,25 @@ #include #include +using std::endl; +using std::cin; +using std::cout; + 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 << "Division: " << x / y << endl; + cout << "Remainder: " << x % y << endl; + cout << "Square Root: " << sqrt(x) << endl; + cout << "Square: " << pow(x, y) << endl; return 0; } From ce41dafd20d476017800b886b06f0d52628cfb06 Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Mon, 2 Feb 2026 12:15:59 -0800 Subject: [PATCH 3/8] Fix #61 division by zero error --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index a495fc94..c173ddad 100644 --- a/main.cpp +++ b/main.cpp @@ -12,6 +12,12 @@ 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){ + cout << "Dividing by zero is not a number.\n"; + } + else{ + cout << "Dividing by zero is not a number.\n"; + } std::cout << "Division: " << x / y << std::endl; std::cout << "Remainder: " << x % y << std::endl; std::cout << "Square Root: " << sqrt(x) << std::endl; From eef8c86f08e0c81ad9078ffa342959ff1aaa79c0 Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Mon, 2 Feb 2026 12:40:35 -0800 Subject: [PATCH 4/8] Resolved Conflicts --- main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 1c4ec744..3c326c7a 100644 --- a/main.cpp +++ b/main.cpp @@ -16,12 +16,11 @@ int main() cout << "Addition: " << x + y << endl; cout << "Subtraction: " << x - y << endl; cout << "Multiplication: " << x * y << endl; - cout << "Division: " << x / y << endl; if(y == 0){ cout << "Dividing by zero is not a number.\n"; } else{ - cout << "Dividing by zero is not a number.\n"; + cout << "Division: " << x / y << endl; } cout << "Remainder: " << x % y << endl; cout << "Square Root: " << sqrt(x) << endl; From fe4408b999f78e50e9deba1303412c61ec61b3c0 Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Mon, 2 Feb 2026 12:42:43 -0800 Subject: [PATCH 5/8] Resolved Conflicts --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 3c326c7a..5af5bd3c 100644 --- a/main.cpp +++ b/main.cpp @@ -20,7 +20,7 @@ int main() cout << "Dividing by zero is not a number.\n"; } else{ - cout << "Division: " << x / y << endl; + cout << "Division: " << x / y << endl; } cout << "Remainder: " << x % y << endl; cout << "Square Root: " << sqrt(x) << endl; From 198d9f3afdbef55b1747d64be9df56d84e3ad86d Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Mon, 2 Feb 2026 13:09:14 -0800 Subject: [PATCH 6/8] Resolved Conflicts --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 5af5bd3c..cfa0f76f 100644 --- a/main.cpp +++ b/main.cpp @@ -20,7 +20,7 @@ int main() cout << "Dividing by zero is not a number.\n"; } else{ - cout << "Division: " << x / y << endl; + cout << "Division: " << x / y << std::endl; } cout << "Remainder: " << x % y << endl; cout << "Square Root: " << sqrt(x) << endl; From 8f6d43cc6a7afb451c0c48f774f75ab288168939 Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Mon, 2 Feb 2026 13:11:31 -0800 Subject: [PATCH 7/8] Resolved Conflictsexit --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index cfa0f76f..652ca31c 100644 --- a/main.cpp +++ b/main.cpp @@ -16,8 +16,8 @@ int main() cout << "Addition: " << x + y << endl; cout << "Subtraction: " << x - y << endl; cout << "Multiplication: " << x * y << endl; - if(y == 0){ - cout << "Dividing by zero is not a number.\n"; + if( y == 0 ){ + cout << "Dividing by zero is not a number.\n"; } else{ cout << "Division: " << x / y << std::endl; From 51eb4865510af7b2b0c310996827b4b594188f28 Mon Sep 17 00:00:00 2001 From: aaronrobinsona Date: Wed, 11 Feb 2026 20:24:02 +0000 Subject: [PATCH 8/8] first push for x07 --- .github/workflows/actions.yml | 23 +++++++++++++++++++++++ gradeyourmelody.md | 5 +++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/actions.yml create mode 100644 gradeyourmelody.md diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 00000000..e21693b8 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: "**" + pull_request: + branches: [ main ] + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build project + run: g++ -std=c++17 main.cpp \ No newline at end of file diff --git a/gradeyourmelody.md b/gradeyourmelody.md new file mode 100644 index 00000000..bdf81703 --- /dev/null +++ b/gradeyourmelody.md @@ -0,0 +1,5 @@ +GRADEYOURMELODY + +##Devs + +-Aaron Robinson Almazan [aaronrobinsona] (https://github.com/aaronrobinsona) \ No newline at end of file