From faef171c54e445905f5dfd6cefc7e226c92a39ea Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 21:01:08 +0100 Subject: [PATCH] case trigonometry cosine angle --- 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 6f0b2d2..2384f51 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -94,7 +94,12 @@ int main() { result = sine(angle); printf("Sine of %.2lf degrees: %lf\n", angle, result); break; - + case 12: + printf("Enter angle in degrees: "); + scanf("%lf", &angle); + result = cosine(angle); + printf("Cosine of %.2lf degrees: %lf\n", angle, result); + break; case : printf("Exiting...\n"); break;