Browse Source

merge

remotes/origin/feature
Enrico Schellenberger 11 months ago
parent
commit
51c3ac6f2e
  1. 59
      src/main/c/main_taschenrechner.c
  2. 23
      src/main/c/programmingMode.c
  3. 10
      src/main/c/scientific.c

59
src/main/c/main_taschenrechner.c

@ -89,46 +89,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
void graphMode() {
double x, y;
@ -148,25 +108,6 @@ void graphMode() {
}
}
// Programming mode
void programmingMode() {
int num1, num2, result;
char operator;
printf("Enter first integer: ");
scanf("%d", &num1);
printf("Enter operator (+, -, *, /): ");
scanf(" %c", &operator);
printf("Enter second integer: ");
scanf("%d", &num2);
}
// change mode
int mode(int userChoice){

23
src/main/c/programmingMode.c

@ -0,0 +1,23 @@
// programmingMode
#include <stdio.h>
#include <math.h>
#include "taschenrechner.h"
void programmingMode() {
int num1, num2, result;
char operator;
printf("Enter first integer: ");
scanf("%d", &num1);
printf("Enter operator (+, -, *, /): ");
scanf(" %c", &operator);
printf("Enter second integer: ");
scanf("%d", &num2);
}

10
src/main/c/scientific.c

@ -1,10 +0,0 @@
// scientific.c
#include <stdio.h>
#include <math.h>
#include "taschenrechner.h"
double scientificMode() {
return 0.0;
}
Loading…
Cancel
Save