From 1e5c21b444042fd0fb2bea6e183c1b0120f91096 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Wed, 7 Feb 2024 14:35:39 +0100 Subject: [PATCH] refactoring: case(for cosine and tangent) --- src/main/c/Calculator/calculator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 8b75156..4cfafd2 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -101,7 +101,12 @@ double combination(int n, int r); case 14: return pow(num1, num2); case 15: - return sin(num1 * M_PI / 180.0); + return sin(num1 * M_PI / 180.0); + case 16: + return cos(num1 * M_PI / 180.0); + case 17: + return tan(num1 * M_PI / 180.0); +