Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string username; //потребителско име
- cin >> username;
- string password; //парола
- cin >> password;
- //повтаряме: въвеждаме парола за вход
- //стоп: въведената парола == password
- //продължаваме: въведената парола != password
- string enteredPassword;
- cin >> enteredPassword;
- while (enteredPassword != password)
- {
- cin >> enteredPassword;
- }
- //enteredPassword == password
- cout << "Welcome " << username << "!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement