|
|
@ -184,16 +184,32 @@ void displayMenu() { |
|
|
|
printf("19. Combination\n"); |
|
|
|
printf("20. Exit\n"); |
|
|
|
} |
|
|
|
int add(int num1, int num2) { |
|
|
|
double add(double num1, double num2) { |
|
|
|
return num1 + num2; |
|
|
|
} |
|
|
|
|
|
|
|
int subtract(int num1, int num2) { |
|
|
|
double subtract(double num1, double num2) { |
|
|
|
return num1 - num2; |
|
|
|
} |
|
|
|
int multiply(int num1, int num2) { |
|
|
|
double multiply(double num1, double num2) { |
|
|
|
return num1 * num2; |
|
|
|
} |
|
|
|
int divide(int num1, int num2) { |
|
|
|
double divide(double num1, double num2) { |
|
|
|
return num1 / num2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
double exponent(double base, double exponent) { |
|
|
|
return pow(base, exponent); |
|
|
|
} |
|
|
|
|
|
|
|
double modulus(double num1, double num2) { |
|
|
|
return fmod(num1, num2); |
|
|
|
} |
|
|
|
|
|
|
|
double logarithm(double num) { |
|
|
|
return log(num); |
|
|
|
} |
|
|
|
|
|
|
|
double potential(double base, double exponent) { |
|
|
|
return pow(base, exponent); |
|
|
|
} |