diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index c053787..7616c8b 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -24,6 +24,7 @@ double cubeRoot(double num); int main() { double choice, num1, num2, result, angle; + int r,n; do { displayMenu(); @@ -155,18 +156,25 @@ int main() { printf("Invalid choice\n"); } } - } while (choice != 5); + } while (choice != 20); return 0; } // Function definitions void displayMenu() { - printf("\nSimple Calculator\n"); + printf("\nAdvaced Calculator\n"); printf("1. Add\n"); printf("2. Subtract\n"); printf("3. Multiply\n"); printf("4. Divide\n"); - printf("5. Exit\n"); + printf("5. Exponentiation\n"); + printf("6. Modulus\n"); + printf("7. Logarithm\n"); + printf("8. Potential\n"); + printf("9. Square Root\n"); + printf("10. Square\n"); + printf("11. Cube\n"); + } int add(int num1, int num2) { return num1 + num2;