|
@ -5,22 +5,6 @@ |
|
|
|
|
|
|
|
|
#include "taschenrechner.h" |
|
|
#include "taschenrechner.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD |
|
|
|
|
|
doulbe add(doulbe a, doulbe b) { |
|
|
|
|
|
return a + b; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
doulbe minus (doulbe a, doulbe b){ |
|
|
|
|
|
return a - b; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
doulbe multiply(doulbe a, doulbe b) { |
|
|
|
|
|
return a * b; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
doulbe divide(doulbe a, doulbe b) { |
|
|
|
|
|
======= |
|
|
|
|
|
double add(double a, double b) { |
|
|
double add(double a, double b) { |
|
|
return a + b; |
|
|
return a + b; |
|
|
} |
|
|
} |
|
@ -34,7 +18,7 @@ double multiply(double a, double b) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
double divide(double a, double b) { |
|
|
double divide(double a, double b) { |
|
|
>>>>>>> feature |
|
|
|
|
|
|
|
|
|
|
|
if (b == 0) { |
|
|
if (b == 0) { |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
@ -106,45 +90,6 @@ int bitwiseXOR(int num1, int num2) { |
|
|
|
|
|
|
|
|
//.. |
|
|
//.. |
|
|
|
|
|
|
|
|
// scientificmode |
|
|
|
|
|
int scientificMode(){ |
|
|
|
|
|
|
|
|
|
|
|
double num, result; |
|
|
|
|
|
|
|
|
|
|
|
int choice; |
|
|
|
|
|
|
|
|
|
|
|
printf("Enter a number: "); |
|
|
|
|
|
|
|
|
|
|
|
scanf("%lf", &num); // scan the number from user |
|
|
|
|
|
|
|
|
|
|
|
printf("Scientific mode Options:\n"); |
|
|
|
|
|
printf("1: Square root:\n"); |
|
|
|
|
|
printf("2: Exponential:\n"); |
|
|
|
|
|
printf("2: Logarithm:\n"); |
|
|
|
|
|
printf("4: Trigonomertic"); |
|
|
|
|
|
scanf("%d", &choice); // user choice |
|
|
|
|
|
|
|
|
|
|
|
switch(choice) { |
|
|
|
|
|
|
|
|
|
|
|
case 1: // Square root |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 2: // Exponential |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 3: // Logarithm |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 4: // Trigonomertic |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
default: printf("Invalid choice. Please try again.\n"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// graphMode |
|
|
// graphMode |
|
|
void graphMode() { |
|
|
void graphMode() { |
|
|
double x, y; |
|
|
double x, y; |
|
|