|
@ -4,17 +4,26 @@ |
|
|
#include <math.h> |
|
|
#include <math.h> |
|
|
#include "taschenrechner.h" |
|
|
#include "taschenrechner.h" |
|
|
|
|
|
|
|
|
// Logarithm |
|
|
|
|
|
void executeLogarithmFunction(double num) { |
|
|
|
|
|
|
|
|
// Choice for Logarithm |
|
|
|
|
|
int getLogarithmChoice() { |
|
|
int logChoice; |
|
|
int logChoice; |
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
printf("Logarithm Options:\n"); |
|
|
printf("Logarithm Options:\n"); |
|
|
printf("1: Logarithm (base 10)\n"); |
|
|
printf("1: Logarithm (base 10)\n"); |
|
|
printf("2: Natural Logarithm (ln)\n"); |
|
|
printf("2: Natural Logarithm (ln)\n"); |
|
|
printf("3: Logarithm (base 2)\n"); |
|
|
printf("3: Logarithm (base 2)\n"); |
|
|
printf("0: Exit Logarithm Menu\n"); |
|
|
printf("0: Exit Logarithm Menu\n"); |
|
|
scanf("%d", &logChoice); |
|
|
scanf("%d", &logChoice); |
|
|
|
|
|
return logChoice; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Logarithm |
|
|
|
|
|
void executeLogarithmFunction(double num) { |
|
|
|
|
|
int logChoice; |
|
|
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
|
|
|
|
logChoice = getLogarithmChoice(); |
|
|
|
|
|
|
|
|
switch (logChoice) { |
|
|
switch (logChoice) { |
|
|
case 1: // Logarithm (base 10) |
|
|
case 1: // Logarithm (base 10) |
|
|