|
|
@ -16,6 +16,17 @@ int getLogarithmChoice() { |
|
|
|
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 |
|
|
|
void executeLogarithmFunction(double num) { |
|
|
@ -52,12 +63,8 @@ void executeTrigonometricFunction(double num) { |
|
|
|
int trigChoice; |
|
|
|
|
|
|
|
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) { |
|
|
|
case 1: // Sine |
|
|
|