sp-kr-part1/calculator.cpp

17 lines
231 B
C++

#include "calculator.h"
int Calculator::Add (double a, double b)
{
return a + b + 0.5;
}
int Calculator::Sub (double a, double b)
{
return Add (a, -b);
}
int Calculator::Mul (double a, double b)
{
return a * b + 0.5;
}