|
@ -13,7 +13,7 @@ double permutation(int n, int r); |
|
|
double combination(int n, int r); |
|
|
double combination(int n, int r); |
|
|
double pow(double num1, double num2); |
|
|
double pow(double num1, double num2); |
|
|
int mod(int num1,int num2); |
|
|
int mod(int num1,int num2); |
|
|
|
|
|
|
|
|
|
|
|
double log(num1); |
|
|
int calculator() { |
|
|
int calculator() { |
|
|
int choice; |
|
|
int choice; |
|
|
double num1, num2, result; |
|
|
double num1, num2, result; |
|
@ -89,7 +89,7 @@ int mod(int num1,int num2); |
|
|
case 6: |
|
|
case 6: |
|
|
return 0; fmod(num1, num2); |
|
|
return 0; fmod(num1, num2); |
|
|
case 7: |
|
|
case 7: |
|
|
return 0;// log(num1); |
|
|
|
|
|
|
|
|
return 0; log(num1); |
|
|
case 8: |
|
|
case 8: |
|
|
return pow(num1, num2); |
|
|
return pow(num1, num2); |
|
|
case 9: |
|
|
case 9: |
|
@ -162,3 +162,7 @@ int mod(int num1, int num2){ |
|
|
int result = num1%num2; |
|
|
int result = num1%num2; |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
double log(double num1){ |
|
|
|
|
|
double result = num1; |
|
|
|
|
|
return result; |
|
|
|
|
|
} |