diff --git a/exercises/calculator.cpp b/exercises/calculator.cpp index 013cc78..2923881 100644 --- a/exercises/calculator.cpp +++ b/exercises/calculator.cpp @@ -10,3 +10,27 @@ Multiplication: 8 Division: 2 */ +#include + +using namespace std; + +void FourOps(int x, int y) +{ + cout << "Sum: " << x + y << "\n"; + cout << "Difference: " << x - y << "\n"; + cout << "Multiplication: " << x * y << "\n"; + cout << "Division: " << x / y; + return; + } + +int main() +{ + int first; + int second; + cout << "Insert first number: "; + cin >> first; + cout << "Insert second number: "; + cin >> second; + FourOps(first, second); + return 0; +} \ No newline at end of file