diff --git a/calculator.cpp b/calculator.cpp index 3c63184..b91afea 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; } -int Calculator::Sub (int a, int b) +int Calculator::Sub (double a, double b) { return Add (a, -b); } diff --git a/calculator.h b/calculator.h index 84ff414..3740907 100644 --- a/calculator.h +++ b/calculator.h @@ -4,8 +4,8 @@ class Calculator { public: - int Add (int, int); - int Sub (int, int); + int Add (double, double); + int Sub (double, double); }; #endif//CALCULATOR_H