C++ Programm wiederholung
Was muss ich machen, damit sich dieses Programm bei der eingabe einer bestimmten Taste neustartet/beendet?
includeusing namespace std;
int main ( ) {
int a = 0;
char c;
cout <<"Zeichen? ";
cin >> c;
if (c == 'I') a = 1;
else if (c == 'V') a = 5;
else if (c == 'X') a = 10;
else if (c == 'L') a = 50;
else if (c == 'C') a = 100;
else if (c == 'D') a = 500;
else if (c == 'M') a = 1000;
if (a == 0) {
cout <<"keine Römische Ziffer!\n";
}
else {
cout << a << endl;
}
system ("Pause");
return 0;
}