diff --git a/calculator.cpp b/calculator.cpp index 3c63184..f323e14 100644 --- a/calculator.cpp +++ b/calculator.cpp @@ -1,11 +1,11 @@ #include "calculator.h" -int Calculator::Add (int a, int b) +int Calculator::Add (double a, double b) { - return a + b; + return a + b; } -int Calculator::Sub (int a, int b) +int Calculator::Sub (double a, double b) { - return Add (a, -b); + return Add (a, -b); } diff --git a/calculator.h b/calculator.h index 84ff414..d59d596 100644 --- a/calculator.h +++ b/calculator.h @@ -3,9 +3,9 @@ class Calculator { - public: - int Add (int, int); - int Sub (int, int); + public: + int Add (double, double); + int Sub (double, double); }; #endif//CALCULATOR_H