Calculator 0.0
Addition, subtraction, multiplication, and division operations on integers.
|
Calculator class. More...
#include <Calc.h>
Public Member Functions | |
int | add (int a, int b) |
int | sub (int a, int b) |
int | mul (int a, int b) |
int | div (int a, int b) |
Calculator class.
This class provides basic calculator operations including: add, sub, mul, div
int Calc::add | ( | int | a, |
int | b | ||
) |
Clac add function: adds two numbers together
a | Number, first operand |
b | Number, second operand |
int Calc::div | ( | int | a, |
int | b | ||
) |
Clac div function: divides two numbers (first by second)
a | Number, first operand |
b | Number, second operand |
int Calc::mul | ( | int | a, |
int | b | ||
) |
Clac mul function: multiplies two numbers together
a | Number, first operand |
b | Number, second operand |
int Calc::sub | ( | int | a, |
int | b | ||
) |
Clac sub function: subtracts two numbers (second from first)
a | Number, first operand |
b | Number, second operand |