#include <iostream>
#include <cmath>
using namespace std;


double Addition(double zahl1, double zahl2)
{
    cout << "Gebe die erste Zahl ein, die addiert werden soll: ";
    cin >> zahl1;
    cout << "Gebe die zweite Zahl ein, die addiert werden soll: ";
    cin >> zahl2;
    double Summe = zahl1 + zahl2;
    cout << "Die Summe ist: " << Summe << endl;
    return zahl1 + zahl2;
}


double Subtraktion(double zahl1, double zahl2)
{
    cout << "Gebe die erste Zahl ein, die subtrahiert werden soll: ";
    cin >> zahl1;
    cout << "Gebe die zweite Zahl ein, die subtrahiert werden soll: ";
    cin >> zahl2;
    double Differenz = zahl1 - zahl2;
    cout << "Die Differenz ist: " << Differenz << endl;
    return zahl1 - zahl2;
}


double Multiplikation(double zahl1, double zahl2)
{
    cout << "Gebe die erste Zahl ein, die multipliziert werden soll: ";
    cin >> zahl1;
    cout << "Gebe die zweite Zahl ein, die multipliziert werden soll: ";
    cin >> zahl2;
    double Produkt = zahl1 * zahl2;
    cout << "Das Produkt ist: " << Produkt << endl;
    return zahl1 * zahl2;
}


double Division(double zahl1, double zahl2)
{
    cout << "Gebe die erste Zahl ein, die dividiert werden soll: ";
    cin >> zahl1;
    cout << "Gebe die zweite Zahl ein, die dividiert werden soll: ";
    cin >> zahl2;
    double Qoutient = zahl1 / zahl2;
    cout << "Der Quotient ist: " << Qoutient << endl;
    return zahl1 / zahl2;
}


double Potenz()
{
    double Basis;
    double Potenz;
    double Ergebnis;
    cout << "Gebe die Basis ein" << endl;
    cin >> Basis;
    cout << "Gebe die Potenz ein" << endl;
    cin >> Potenz;
    Ergebnis = pow(Basis, Potenz);
    cout << "Die Potenz ist: " << Ergebnis << endl;
    return pow(Basis, Potenz);
}


int main()
{
    char Rechenoperator;
    cout << "UNIVERSAL RECHNER" << endl;
    cout << "Bitte wähle die Rechenoperation aus" << endl;
    cout << "Addition(+)\nSubtraktion(-)\nMultiplikation(*)\nDivision(/)" << endl;
    cout << "Potenz(^)\nWurzel(<)\nProzent(%)" << endl;
    cin >> Rechenoperator;


    switch (Rechenoperator)
    {
    case '+':
        Addition(zahl1, zahl2);
        break;
    case '-':
        Subtraktion(zahl1, zahl2);
        break;
    case '*':
        Multiplikation(zahl1, zahl2);
        break;
    case '/':
        Division (zahl1, zahl2);
        break; 
    case '^':
        Potenz(Basis, Potenz);
        break;


    default:
        cout << "Ungültige Eingabe" << endl;
    }


    return 0;
}

main.cpp: In function ‘int main()’:
main.cpp:75:18: error: ‘zahl1’ was not declared in this scope
   75 |         Addition(zahl1, zahl2);
      |                  ^~~~~
main.cpp:75:25: error: ‘zahl2’ was not declared in this scope
   75 |         Addition(zahl1, zahl2);
      |                         ^~~~~
main.cpp:87:16: error: ‘Basis’ was not declared in this scope
   87 |         Potenz(Basis, Potenz);