|
|
@ -125,30 +125,18 @@ int holeSpielerAntwort() { |
|
|
|
scanf("%d", &spielerAntwort); |
|
|
|
return spielerAntwort; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int berechneErgebnis(int zahl1, int zahl2, char operator) { |
|
|
|
switch (operator) { |
|
|
|
case '+': |
|
|
|
return addiere(zahl1, zahl2); |
|
|
|
case '-': |
|
|
|
return subtrahiere(zahl1, zahl2); |
|
|
|
case '*': |
|
|
|
return multipliziere(zahl1, zahl2); |
|
|
|
case '/': |
|
|
|
return dividiere(zahl1, zahl2); |
|
|
|
default: |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|