From 26dc00e02c6888e9231ac5eecb20d8da488f4a21 Mon Sep 17 00:00:00 2001 From: Cole Date: Wed, 11 Sep 2024 11:45:12 -0700 Subject: [PATCH 1/2] fixing updates code issues --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 47b917d..04844fb 100644 --- a/main.cpp +++ b/main.cpp @@ -20,4 +20,4 @@ int main(){ cout<< (first*second) << endl; return 0; -} \ No newline at end of file +} From da0f2f7f076b4bdee00cd1db0133b444c1a84c3c Mon Sep 17 00:00:00 2001 From: Cole Date: Thu, 12 Sep 2024 11:24:44 -0700 Subject: [PATCH 2/2] Adding division path in main --- main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.cpp b/main.cpp index 04844fb..b294e71 100644 --- a/main.cpp +++ b/main.cpp @@ -14,10 +14,20 @@ int main(){ cout<< "Addition: "<< first << "+" << second << "="; cout<< (first+second) << endl; + cout<< "Subtraction: "<< first << "-" << second << "="; cout<< (first-second) << endl; + cout<< "Multiplication: "<< first << "*" << second << "="; cout<< (first*second) << endl; + if((first != 0) && (second != 0)){ + cout<< "Division: "<< first << "/" << second << "="; + cout<< (first/second) << endl; + } + else{ + cout << "Error: Either number can't be Zero, can't do Division." << endl; + } + return 0; }