sp-kr-part1/calculator.cpp
hasslesstech 71f04b9f60
improve upon stylistic choice of Mul function
The function seemed too crammed to me, so I made it look much more
spacious than before.

Signed-off-by: IO-23 Oleh Shmuliar <hasslesstech@tutanota.com>
2024-10-07 19:26:54 +03:00

21 lines
266 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;
}