Hi,
ich bin beim Programmieren noch ein Anfänger :D.
Deshalb hab ich ein Problem.
Wenn ich bei diesem Prog:
eine Zahl eingebe geht das Programm sofort aus.
Ich weiß das ist für bestimmt das einfachste Prrogramm der Welt aber trozdem
stell ich diese Frage
und noch was
Ich will ein Programm machen wo man erst ein Passwort eingeben musst
Ich habs mal so Probiert (ich weiß da is was falsch aber was oder wie kann man das besser machen?)
Ghosty
ich bin beim Programmieren noch ein Anfänger :D.
Deshalb hab ich ein Problem.
Wenn ich bei diesem Prog:
#include <iostream>
using namespace std;
int main()
{
int Zahleingabe;
int Doppel;
cout << "Bitte geben Sie eine Zahl ein!" << endl;
cin >> Zahleingabe;
Doppel = Zahleingabe * 2;
cout << "Das Doppelte dieser Zahl ist "
<< Doppel << "." << endl;
}
eine Zahl eingebe geht das Programm sofort aus.
Ich weiß das ist für bestimmt das einfachste Prrogramm der Welt aber trozdem
stell ich diese Frage

und noch was
Ich will ein Programm machen wo man erst ein Passwort eingeben musst
Ich habs mal so Probiert (ich weiß da is was falsch aber was oder wie kann man das besser machen?)
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main()
{
string Passwort;
bool Pass;
cout << "Bitte geben Sie das Passwort ein!" << endl;
cin >> Passwort;
system("Pause");
if (cin==Passwort)
{
Pass = true
}
if (cin!=Passwort)
{
void exit()
}
}
Ghosty
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Ghosty ()