From 8439c6cbdf8c7304030b1042234bee2739074dec Mon Sep 17 00:00:00 2001 From: MaccxG Date: Wed, 18 Oct 2023 19:03:37 +0200 Subject: [PATCH 1/2] feat: addee calculator.cpp --- exercises/calculator.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/exercises/calculator.cpp b/exercises/calculator.cpp index 013cc78..8a91a70 100644 --- a/exercises/calculator.cpp +++ b/exercises/calculator.cpp @@ -10,3 +10,22 @@ Multiplication: 8 Division: 2 */ + +#include + +using namespace std; + +int main() { + int x, y; + cout << "Insert first number: "; + cin >> x; + cout << "Insert second number: "; + cin >> y; + + cout << "Sum: " << x + y; + cout << "Difference: " << x - y; + cout << "Multiplication: " << x * y; + cout << "Division: " << x / y; + + return 0; +} From 8872b5acc9df3a59fcfc5551f96fc400ea85c824 Mon Sep 17 00:00:00 2001 From: MaccxG Date: Wed, 18 Oct 2023 19:05:39 +0200 Subject: [PATCH 2/2] feat: added calculator.cpp --- exercises/calculator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/calculator.cpp b/exercises/calculator.cpp index 8a91a70..b58d5e4 100644 --- a/exercises/calculator.cpp +++ b/exercises/calculator.cpp @@ -22,10 +22,10 @@ int main() { cout << "Insert second number: "; cin >> y; - cout << "Sum: " << x + y; - cout << "Difference: " << x - y; - cout << "Multiplication: " << x * y; - cout << "Division: " << x / y; + cout << "Sum: " << x + y << endl; + cout << "Difference: " << x - y << endl; + cout << "Multiplication: " << x * y << endl; + cout << "Division: " << x / y << endl; return 0; }