From 27a55f96381b55aa9ec3e5b991565b0ad2d6393e Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 20:55:52 +0100 Subject: [PATCH] case sqaureRoot --- src/main/c/Calculator/calculator.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 750d788..b25d868 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -75,6 +75,12 @@ int main() { scanf("%lf %lf", &num1, &num2); result = potential(num1, num2); printf("Result: %lf\n", result); + break; + case 9: + printf("Enter a number: "); + scanf("%lf", &num1); + result = squareRoot(num1); + printf("Result: %lf\n", result); break; case : printf("Exiting...\n");