diff --git a/calculator.cpp b/calculator.cpp index d93e35b..7e4c545 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 3740907..fdf5ddd 100644 --- a/calculator.h +++ b/calculator.h @@ -6,6 +6,7 @@ class Calculator public: int Add (double, double); int Sub (double, double); + int Mul (double, double); }; #endif//CALCULATOR_H