diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 40c1b42..dc61a74 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -184,16 +184,32 @@ void displayMenu() { printf("19. Combination\n"); printf("20. Exit\n"); } -int add(int num1, int num2) { +double add(double num1, double num2) { return num1 + num2; } -int subtract(int num1, int num2) { +double subtract(double num1, double num2) { return num1 - num2; } -int multiply(int num1, int num2) { +double multiply(double num1, double num2) { return num1 * num2; } -int divide(int num1, int num2) { +double divide(double num1, double num2) { return num1 / num2; -} \ No newline at end of file +} + +double exponent(double base, double exponent) { + return pow(base, exponent); +} + +double modulus(double num1, double num2) { + return fmod(num1, num2); +} + +double logarithm(double num) { + return log(num); +} + +double potential(double base, double exponent) { + return pow(base, exponent); +}