From 2bc2fc8f03ecfec3e204b18d01c627e2cc60a38a Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Wed, 7 Feb 2024 14:29:29 +0100 Subject: [PATCH] refactoring: case(for cbrt and factorial) --- src/main/c/Calculator/calculator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index bdfbfc2..056e940 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -93,7 +93,11 @@ double combination(int n, int r); case 10: return num1 * num1; case 11: - return num1 * num1 * num1; + return num1 * num1 * num1; + case 12: + return cbrt(num1); + case 13: + return factorial(num1);