#include #define EOF (-1) using namespace std; double addition(double ersteZahl, double zweiteZahl){ double erg = ersteZahl + zweiteZahl; cout << ersteZahl<< " + " << zweiteZahl << " = " << erg << endl; return erg; } double subtraktion(double ersteZahl, double zweiteZahl){ int erg = ersteZahl - zweiteZahl; cout << ersteZahl<< " - " << zweiteZahl << " = " <> operation; if (operation == '+') { pruef = true; } else if (operation == '*') { pruef = true; } else if (operation == '/') { pruef = true; } else if (operation == '-') { pruef = true; } else { cout << "Keine definierte Rechenoperation!" << endl; while ((clear = getchar()) != '\n' && clear != EOF) { } } } while (!pruef); cout << "Erste Zahl:"; cin >> ersteZahl; cout << "Zweite Zahl:"; cin >> zweiteZahl; switch (operation) { case '+': addition(ersteZahl, zweiteZahl); case '-': subtraktion(ersteZahl, zweiteZahl); break; case '*': multiplikation(ersteZahl, zweiteZahl); case '/': while (zweiteZahl == 0){ cout << "Man kann nicht durch 0 teilen. Geben Sie eine neue zweite Zahl ein:"; cin >> zweiteZahl; } division(ersteZahl, zweiteZahl); } }