diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 6e75e9b..99894eb 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -227,4 +227,26 @@ double cube(double num) { double cubeRoot(double num) { return cbrt(num); +}double factorial(double num) { + if (num == 0) { + return 1; + } else { + return num * factorial(num - 1); + } +} + +double power(double base, double exponent) { + return pow(base, exponent); +} + +double sine(double angle) { + return sin(angle * M_PI / 180.0); +} + +double cosine(double angle) { + return cos(angle * M_PI / 180.0); +} + +double tangent(double angle) { + return tan(angle * M_PI / 180.0); }