Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Practise 2 site 73.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <string>
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- string username1, username2, password1, password2;
- cout << "Enter a username!" << endl;
- getline(cin, username1);
- cout << "Enter the username again!" << endl;
- getline(cin, username2);
- cout << "enter a password!" << endl;
- getline(cin, password1);
- cout << "Enter the password again!" << endl;
- getline(cin, password2);
- if (password1 == "monaola" && username1 == "nikolaisen1998")
- {
- cout << "Welcome!" << endl;
- }
- else if (password2 == "monaolaa" && username2 == "nikko415" )
- {
- cout << " the password is correct!" << endl;
- }
- else
- {
- cout << "The password or the username is inccorect!" << endl;
- cout << "You may try again in 30 seconds." << endl;
- return _tmain();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement