wie man wieder nach einer Eingabe fragt c ++

Meine Frage ist, wie ich den Benutzer frage, ob er / sie noch einmal eingeben möchte. Ex. willst du nochmal rechnen ja oder Nein

Kann jemand erklären, was ich falsch mache und den Fehler beheben.

int main() {
}
int a;
cout << endl << "Write 1 for addition and 0 for substraction:" << endl;
cin >> a;

// addition
if (a == 1) {
    cout << "You are now about to add two number together, ";
    cout << "enter a number: " << endl;
    int b;
    cin >> b;
    cout << "one more: " << endl;
    int c;
    cin >> c;
    cout << b + c;
}
//Substraction
else if (a == 0) {
    cout << "enter a number: " << endl;
    int b;
    cin >> b;
    cout << "one more: " << endl;
    int c;
    cin >> c;
    cout << b - c;
}
//If not 1 or 0 was called
else {
    cout << "Text" << endl;

}
    return 0;
}

Antworten auf die Frage(2)

Ihre Antwort auf die Frage