From c0a83ef147d2a261838c0d41cb22bfc83ab11f89 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 20:55:01 +0100 Subject: [PATCH] case potential --- 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 7a570bc..750d788 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -70,6 +70,12 @@ int main() { result = logarithm(num1); printf("Result: %lf\n", result); break; + case 8: + printf("Enter base and exponent: "); + scanf("%lf %lf", &num1, &num2); + result = potential(num1, num2); + printf("Result: %lf\n", result); + break; case : printf("Exiting...\n"); break;