From db5a089d4c88ebd0e19a8d2ed0c94b701c834eae Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Wed, 7 Feb 2024 11:01:46 +0100 Subject: [PATCH] adding math.h --- src/main/c/Calculator/calculator.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 6f0a91d..b6f0037 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -1,4 +1,5 @@ #include +#include // Function prototypes void displayMenu(); @@ -23,8 +24,8 @@ double cube(double num); double cubeRoot(double num); int main() { - double choice, num1, num2, result, angle; - int r,n; + double num1, num2, result, angle; + int choice,r,n; do { displayMenu(); @@ -156,10 +157,10 @@ int main() { printf("Invalid choice\n"); } } - } while (choice != 20); + while (choice != 20); return 0; -} + } // Function definitions void displayMenu() { printf("\nAdvaced Calculator\n");