Browse Source

adding math.h

remotes/origin/Ulrich
Ulriche Nguefack 11 months ago
parent
commit
db5a089d4c
  1. 9
      src/main/c/Calculator/calculator.c

9
src/main/c/Calculator/calculator.c

@ -1,4 +1,5 @@
#include <stdio.h>
#include <math.h>
// 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");

Loading…
Cancel
Save