From 621e55e5b5aab32db923b471c26df1ab063c7eea Mon Sep 17 00:00:00 2001 From: LorenzoMaci Date: Wed, 18 Oct 2023 18:52:19 +0200 Subject: [PATCH] feat: exercise calculator --- exercises/calculator.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/exercises/calculator.cpp b/exercises/calculator.cpp index 013cc78..9af9d3c 100644 --- a/exercises/calculator.cpp +++ b/exercises/calculator.cpp @@ -10,3 +10,20 @@ Multiplication: 8 Division: 2 */ + +#include + +using namespace std; + +void operation(int a, int b){ + cout << "SUM: " << a + b << endl; + cout << "Difference: " << a - b << endl; + cout << "Multiplication: " << a*b << endl; + cout << "Divsion: "<< a/b << endl; +} + +int main(){ + int a = 4; + int b = 2; + operation(a, b); +} \ No newline at end of file