From 93a49e367a8acc1a4fbd86c7421ed97b6a77e368 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 20:57:09 +0100 Subject: [PATCH] case square --- 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 b25d868..2cc9319 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -82,6 +82,12 @@ int main() { result = squareRoot(num1); printf("Result: %lf\n", result); break; + case 10: + printf("Enter a number: "); + scanf("%lf", &num1); + result = square(num1); + printf("Result: %lf\n", result); + break; case : printf("Exiting...\n"); break;