Browse Source

Added programmingMode.c file and moved functions from main_calculator.c in the programmingMode.c file

remotes/origin/feature
fdai7782 11 months ago
parent
commit
e10023b3a4
  1. 19
      src/main/c/main_taschenrechner.c
  2. 23
      src/main/c/programmingMode.c
  3. 10
      src/main/c/scientific.c

19
src/main/c/main_taschenrechner.c

@ -148,25 +148,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