From ff572b5e52ea5f88cb653f2b34e572de32f86a23 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Wed, 7 Feb 2024 14:25:49 +0100 Subject: [PATCH] refactoring: case(for power and modulus) --- src/main/c/Calculator/calculator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 06be2f8..84165cf 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -80,6 +80,10 @@ double combination(int n, int r); return num1 * num2; case 4: return num1 / num2; + case 5: + return pow(num1, num2); + case 6: + return fmod(num1, num2);