From 801805c4e6fbc536b35e3e8e19d15352cafb463b Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 21:58:54 +0100 Subject: [PATCH] squareRoot square cube cubeRoot operations called --- src/main/c/Calculator/calculator.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index dc61a74..6e75e9b 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -213,3 +213,18 @@ double logarithm(double num) { double potential(double base, double exponent) { return pow(base, exponent); } +double squareRoot(double num) { + return sqrt(num); +} + +double square(double num) { + return num * num; +} + +double cube(double num) { + return num * num * num; +} + +double cubeRoot(double num) { + return cbrt(num); +}