From b8e4ec56655a21715c4060f38f73ea21118d41d8 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Wed, 7 Feb 2024 14:30:42 +0100 Subject: [PATCH] refactoring: case(for pow and sine) --- 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 056e940..8b75156 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -97,7 +97,11 @@ double combination(int n, int r); case 12: return cbrt(num1); case 13: - return factorial(num1); + return factorial(num1); + case 14: + return pow(num1, num2); + case 15: + return sin(num1 * M_PI / 180.0);