|
@ -16,6 +16,17 @@ int getLogarithmChoice() { |
|
|
return logChoice; |
|
|
return logChoice; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int getTrigonometricChoice() { |
|
|
|
|
|
int trigChoice; |
|
|
|
|
|
printf("Trigonometric functions:\n"); |
|
|
|
|
|
printf("1: Sine\n"); |
|
|
|
|
|
printf("2: Cosine\n"); |
|
|
|
|
|
printf("3: Tangent\n"); |
|
|
|
|
|
printf("0: Exit Trigonometric Menu\n"); |
|
|
|
|
|
scanf("%d", &trigChoice); |
|
|
|
|
|
return trigChoice; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Logarithm |
|
|
// Logarithm |
|
|
void executeLogarithmFunction(double num) { |
|
|
void executeLogarithmFunction(double num) { |
|
@ -52,12 +63,8 @@ void executeTrigonometricFunction(double num) { |
|
|
int trigChoice; |
|
|
int trigChoice; |
|
|
|
|
|
|
|
|
do { |
|
|
do { |
|
|
printf("Trigonometric functions:\n"); |
|
|
|
|
|
printf("1: Sine\n"); |
|
|
|
|
|
printf("2: Cosine\n"); |
|
|
|
|
|
printf("3: Tangent\n"); |
|
|
|
|
|
printf("0: Exit Trigonometric Menu\n"); |
|
|
|
|
|
scanf("%d", &trigChoice); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trigChoice = getTrigonometricChoice(); |
|
|
|
|
|
|
|
|
switch (trigChoice) { |
|
|
switch (trigChoice) { |
|
|
case 1: // Sine |
|
|
case 1: // Sine |
|
|