diff --git a/calculator.cpp b/calculator.cpp index d10f529..df0040b 100644 --- a/calculator.cpp +++ b/calculator.cpp @@ -9,3 +9,8 @@ int Calculator::Sub (double a, double b) { return Add (a, -b); } + +int Calculator::Mul (double a, double b) +{ + return a * b + 0.5; +} diff --git a/calculator.h b/calculator.h index d59d596..bd40bcd 100644 --- a/calculator.h +++ b/calculator.h @@ -6,6 +6,8 @@ class Calculator public: int Add (double, double); int Sub (double, double); + int Mul (double, double); +>>>>>>> e0ea21b (add a multiplication operation) }; #endif//CALCULATOR_H