napsta
23.08.2010, 18:20
Hi Member,
Dieser c++ Quelltext funktioniert nicht richtig weiß jemand wo der fehler ist?
Ich kom da einfach nicht weiter.
#include <iostream>
using namespace std;
int main()
{
int zahl1;
int zahl2;
int ergebnis;
cout << "geben Sie die erstezahl ein: ";
cin >> zahl1;
cout << endl;
cout << "geben Sie die Zweitezahl ein: ";
cin >> zahl2;
cout << endl;
ergebnis = zahl1 + zahl2;
cout << "das Ergebnis ist: " << ergebnis << endl << endl;
cin.get();
return 0;
}
Dieser c++ Quelltext funktioniert nicht richtig weiß jemand wo der fehler ist?
Ich kom da einfach nicht weiter.
#include <iostream>
using namespace std;
int main()
{
int zahl1;
int zahl2;
int ergebnis;
cout << "geben Sie die erstezahl ein: ";
cin >> zahl1;
cout << endl;
cout << "geben Sie die Zweitezahl ein: ";
cin >> zahl2;
cout << endl;
ergebnis = zahl1 + zahl2;
cout << "das Ergebnis ist: " << ergebnis << endl << endl;
cin.get();
return 0;
}